IBM WebSphere® DataPower® XC10 Appliance
Release 1.0 Client API Specification

com.ibm.websphere.objectgrid.plugins
Interface MapEventListener


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.

Since:
WAS XD 6.0, XC10
See Also:
BackingMap.addMapEventListener(MapEventListener), BackingMap.removeMapEventListener(MapEventListener), BackingMap.setMapEventListeners(List)

Method Summary
 void entryEvicted(java.lang.Object key, java.lang.Object value)
          Invoked when the specified entry is evicted from the map.
 void preloadCompleted(java.lang.Throwable t)
          Invoked when the preloading of this map has completed.
 

Method Detail

entryEvicted

void entryEvicted(java.lang.Object key,
                  java.lang.Object value)
Invoked when the specified entry is evicted from the map.

The eviction could have occurred either by an Evictor's processing or by invoking one of the invalidate methods on the ObjectMap.

Parameters:
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.
See Also:
Evictor, EvictionEventCallback, ObjectMap.invalidate(Object, boolean)

preloadCompleted

void preloadCompleted(java.lang.Throwable t)
Invoked when the preloading of this map has completed.

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.

Parameters:
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.
See Also:
Loader#preloadMap(Session, BackingMap), BackingMap.setPreloadMode(boolean)

IBM WebSphere® DataPower® XC10 Appliance
Release 1.0 Client API Specification

© Copyright International Business Machines Corp 2005,2010. All rights reserved.