org.objectweb.perseus.cache.api
Interface UnbindManager

All Known Subinterfaces:
ReplacementManager
All Known Implementing Classes:
AbstractReplacementManager, BasicCacheManager

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
 java.util.Collection unbind(CacheEntryFilter filter, boolean force)
          Evicts the entries which are accepted by the filter.
 boolean unbind(java.lang.Object oid, boolean force)
          Evicts an instance from the cache.
 java.util.Collection unbindAll(java.util.Collection oids, boolean force)
          Evicts instances from the cache.
 java.util.Collection unbindUnfixed(boolean force)
          Try to evict unfixed instances.
 

Method Detail

unbind

public boolean unbind(java.lang.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 java.util.Collection unbindAll(java.util.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 java.util.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

unbind

public java.util.Collection unbind(CacheEntryFilter filter,
                                   boolean force)
                            throws CacheException
Evicts the entries which are accepted by the filter.

Parameters:
filter - is a cacheentry filter indicating wich entry has to be evicted
force - is a boolean value indicating if the cache must remove the entries or let the GC does its job.
Returns:
the collection of cache entry identifier really evicted.
Throws:
CacheException


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