| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |
com.ibm.websphere.objectgrid.plugins
EvictionEventCallback
An instance of EvictionEventCallback is passed into the Evictor at initialization time.
When an eviction method is called, corresponding methods of EvictionEventCallback will be
called so the BaseMap can process evictions.
Method Summary |
public
void | setEvictorData(java.lang.Object, com.ibm.websphere.objectgrid.plugins.EvictorData)
Sets the evictor data in cache entry for a specified BackingMap key. .
|
public
EvictorData | getEvictorData(java.lang.Object)
Gets the evictor data for a specified BackingMap cache entry.
|
public
void | evictMapEntries(java.util.List)
This method is the prefered method for the Evictor to use when evicting map entries..
|
public
void | evictEntries(java.util.List)
If Evictor chooses not to implement the EvictorData interface, then this method can
be used to evict a map entry.
|
setEvictorData
public void setEvictorData( | Object key , | | EvictorData data )
|
Sets the evictor data in cache entry for a specified BackingMap key.
This method can be used by an implementor of the com.ibm.websphere.objectgrid.plugins.Evictor
interface to keep data that the evictor needs for determining which cache entry to evict.
Parameters:
key
-
is the key for accessing a BackingMap entry.
data
-
the EvictorData object to store as evictor data for specified key.
Throws:
java.lang.IllegalArgumentException
getEvictorData
public EvictorData getEvictorData( | | Object key )
|
Gets the evictor data for a specified BackingMap cache entry.
Parameters:
key
-
the key for the BackingMap entry to set.
Returns:
if the specified key is not found in BackingMap, then the special value
com.ibm.websphere.objectgrid.plugins.EvictorData#KEY_NOT_FOUND is returned.
If the key is found in the BackingMap, the same reference
that was previously passed to the #setEvictorData(Object, EvictorData) method
of this interface is returned. A null reference is returned if the key is found,
but the setEvictorData method was not previously called for the specified key.
Throws:
java.lang.IllegalArgumentException
evictMapEntries
public void evictMapEntries( | | List evictorDataList )
|
This method is the prefered method for the Evictor to use when evicting map entries.
A list of EvictorData objects is passed as an argument to this method. For each
EvictorData object in the list, the key is obtained from the EvictorData object and
used to determine which BackingMap entry to evict. The BackingMap entry is evicted
if and only if the cache entry for BackingMap entry contains the exact same
EvictorData object in it. That is, the java == operator is used to ensure it is
the exact same EvictorData object. If the == operator indicates a different object,
then the map entry is not evicted. For those map entries that are physically evicted
from the Map, the Evictor will receive notification through the apply method of
the Evictor interface.
See Also:
-
getKey()apply(LogSequence)
Parameters:
evictorDataList
-
is list of EvictorData objects to process.
Throws:
com.ibm.websphere.objectgrid.ObjectGridException
evictEntries
public void evictEntries( | | List keysToEvictList )
|
If Evictor chooses not to implement the EvictorData interface, then this method can
be used to evict a map entry. However, the Evictor must be prepared to handle exposure
of application removing and recreating a map entry before Evictor has opportunity to
call this method.
For this method, a list of map keys is passed to this method. The list is evaluated
and an eviction is conducted on the list. When the entries are physically evicted from
the Map, the Evictor will receive notification through the apply method.
See Also:
-
apply(LogSequence)
Parameters:
keysToEvictList
-
List of keys to evict from the map.
Throws:
com.ibm.websphere.objectgrid.ObjectGridException
| IBM WebSphere Extended Deployment (XD)TM
Release 6.0 |