IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

com.ibm.websphere.objectgrid.plugins
Interface BackingMapPlugin

All Superinterfaces:
Destroyable, Initializable
All Known Subinterfaces:
KeySerializerPlugin, MapSerializerPlugin, ValueSerializerPlugin
All Known Implementing Classes:
BasicMapSerializerPlugin, HashIndex, InverseRangeIndex

public interface BackingMapPlugin
extends Initializable, Destroyable

BackingMap plug-ins implement this interface to be invoked when the plug-in should be initialized and destroyed.

BackingMap plug-ins are instantiated, state is injected into the plug-in, it is then initialized and finally destroyed. The destroy method will only be invoked for plug-ins that have successfully been initialized. A plug-in cannot be initialized or destroyed more than once.

General lifecycle:

  1. UserBackingMapPlugin plugin = new UserBackingMapPlugin();
  2. All setter methods are called to set the plugin's state.
  3. plugin.initialize();
  4. plugin.destroy();
  5. plugin = null;
Any exceptions thrown from the initialize method are fatal and result in the parent BackingMap to fail to initialize. The result of the exception depends on the current state of the BackingMap.

Plug-ins can optionally register a BackingMapLifecycleListener to be notified of other map-related events during the initialize method, or can directly implement the BackingMapLifecycleListener interface which will automatically register the plug-in as a listener.

Since:
7.1.1
See Also:
BackingMapLifecycleListener

Method Summary
 BackingMap getBackingMap()
          Retrieve the BackingMap instance associated with this plug-in.
 void setBackingMap(BackingMap map)
          The BackingMap instance is at an undefined state, depending on the type of plug-in and how it was registered with the map.
 
Methods inherited from interface com.ibm.websphere.objectgrid.plugins.Initializable
initialize, isInitialized
 
Methods inherited from interface com.ibm.websphere.objectgrid.plugins.Destroyable
destroy, isDestroyed
 

Method Detail

setBackingMap

void setBackingMap(BackingMap map)
The BackingMap instance is at an undefined state, depending on the type of plug-in and how it was registered with the map. Use the BackingMap.getState() method to determine what state the map is in.

Parameters:
map - the BackingMap associated with this plug-in instance.

getBackingMap

BackingMap getBackingMap()
Retrieve the BackingMap instance associated with this plug-in.

During normal operation, this method may be called to confirm the correct operation of the BackingMapPlugin. It must return the BackingMap instance previously set using the setBackingMap(BackingMap) method.

Returns:
the BackingMap instance.

IBM WebSphereTM eXtreme Scale, Release 8.6
API Specification

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