|
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 MapEventListener
This callback interface is implemented by the application when it wants to receive events about a Map such as the eviction of a map entry.
BackingMap.addMapEventListener(EventListener)
,
BackingMap.removeMapEventListener(EventListener)
,
EventListener
Method Summary | |
---|---|
void |
entryEvicted(Object key,
Object value)
Invoked when the specified entry is evicted from the map. |
void |
preloadCompleted(Throwable t)
Invoked when the preloading of this map has completed. |
Method Detail |
---|
void entryEvicted(Object key, Object value)
The eviction could have occurred either by an Evictor
's
processing or by invoking one of the invalidate
methods on
the ObjectMap
.
For a MapEventListener in an ObjectMap
that is configured to use OutputFormat.RAW
for the keys and values, the keys and values
objects passed will be SerializedKey
or SerializedValue
objects respectively. If required, you
can use the SerializedEntry.getObject()
method to retrieve (possibly inflating
the serialized object) the original key or value object.
To override the map's output format configuration, use the PluginOutputFormat
annotation in the implementation class.
key
- The key for the map entry that was evicted.value
- The value that was in in the map entry evicted. The value object
should not be modified.Evictor
,
EvictionEventCallback
,
ObjectMap.invalidate(Object, boolean)
void preloadCompleted(Throwable t)
This method is useful to determine when a preload operation finishes if asynchronous preloading is enabled. In addition if any error occurred during synchronous or asynchronous preload, it is reported with the invocation of this method.
t
- A Throwable object that indicates if preload completed without any
Throwable occuring during the preload of the map. A null reference
indicates preload completed without any Throwable objects occuring
during the preload of the map.Loader.preloadMap(Session, BackingMap)
,
BackingMap.setPreloadMode(boolean)
|
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 |