|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface 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 BackingMap
can process evictions.
Evictor
,
EvictorData
Method Summary | |
---|---|
void |
evictEntries(List keysToEvictList)
If an Evictor chooses not to implement the
EvictorData interface, this method can be used to evict a
map entry. |
void |
evictMapEntries(List evictorDataList)
This method is the preferred method for the Evictor to use
when evicting map entries. |
EvictorData |
getEvictorData(Object key)
Gets the evictor data for a specified BackingMap cache entry. |
void |
setEvictorData(Object key,
EvictorData data)
Sets the evictor data for a specified BackingMap cache key. |
Method Detail |
---|
void setEvictorData(Object key, EvictorData data)
This method can be used by an implementor of the Evictor
interface to keep data that the evictor needs for determining which
cache entry to evict.
key
- is the key for accessing a BackingMap entry.data
- the EvictorData object to store as evictor data for a specified key.
IllegalArgumentException
- if key is a null reference or there
is no BackingMap cache entry for this key.Evictor
EvictorData getEvictorData(Object key)
key
- the key for the BackingMap entry to set.
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.
IllegalArgumentException
- if key is a null reference.setEvictorData(Object, EvictorData)
,
EvictorData.KEY_NOT_FOUND
void evictMapEntries(List evictorDataList) throws ObjectGridException
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 its apply
method.
evictorDataList
- a list of EvictorData
objects to process.
The caller must guarantee this parameter is not
null
or contain any null
references.
ObjectGridException
- if an error occurs during processing
ClassCastException
- if an object in evictorDataList does
not implement the EvictorData
interface.Evictor.apply(LogSequence)
,
EvictorData.getKey()
void evictEntries(List keysToEvictList) throws ObjectGridException
Evictor
chooses not to implement the
EvictorData
interface, this method can be used to evict a
map entry. However, the Evictor
must be prepared to handle
the exposure of an application removing and recreating a map entry
before the Evictor
has an opportunity to call this method.
For this method, a list of map keys is passed. 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 its apply
method.
keysToEvictList
- List of keys to evict from the map.
The caller must guarantee this parameter is not
null
or contain any null
references.
ObjectGridException
- if an error occurs during processingEvictor.apply(LogSequence)
|
IBM WebSphereTM eXtreme Scale, Release 8.6 API Specification |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |