org.objectweb.perseus.cache.api

Interface UnbindManager

Known Subinterfaces:
ReplacementManager
Known Implementing Classes:
AbstractReplacementManager, BasicCacheManager, FIFOReplacementManager, LRUReplacementManager, MRUReplacementManager

public interface UnbindManager

This interface is used by the replacement manager to evict an instance from the cache. The primitive CacheManager component and the replacement manager implement this interface. In some implementation the instance is not evicted on the call of the unbind method weither the java Garbage Collector and the strengh link to entry.

Author:
Luciano Garcia-Banuelos (Luciano.Garcia@imag.fr)

Method Summary

boolean
unbind(Object oid, boolean force)
Evicts an instance from the cache.
Collection
unbindAll(Collection oids, boolean force)
Evicts instances from the cache.
Collection
unbindUnfixed(boolean force)
Try to evict unfixed instances.

Method Details

unbind

public boolean unbind(Object oid,
                      boolean force)
            throws CacheException
Evicts an instance from the cache.

Parameters:
oid - is the identifier associated to the cache entry to evict
force - is a boolean value indicating if the cache must remove the entry or let the GC does its job.

Throws:
CacheException - is raised when the entry is already unbound from the cache.


unbindAll

public Collection unbindAll(Collection oids,
                            boolean force)
            throws CacheException
Evicts instances from the cache.

Parameters:
oids - is a collection of the identifier associated to cache entries to evict
force - is a boolean value indicating if the cache must remove the entries or let the GC does its job.

Returns:
the oid of the really evicted entries

Throws:
CacheException - is raised when entries are already unbound from the cache.


unbindUnfixed

public Collection unbindUnfixed(boolean force)
            throws CacheException
Try to evict unfixed instances.

Parameters:
force - is a boolean value indicating if the cache must remove the entries or let the GC does its job.

Returns:
the number of entry really evicted

Throws:
CacheException -


Copyright © 2000-2002 France Telecom S.A., INRIA, IMAG-LSR All Rights Reserved.