Program guide > Programming with system APIs and plug-ins
Plug-ins for providing event listeners
Use the ObjectGridEventListener and MapEventListener plug-ins to configure notifications for various events in the eXtreme Scale cache. Listener plug-ins are registered with an ObjectGrid or BackingMap instance like other eXtreme Scale plug-ins and add integration and customization points for applications and cache providers.
ObjectGridEventListener plug-in
An ObjectGridEventListener plug-in provides eXtreme Scale life cycle events for the ObjectGrid instance, shards, and transactions. Use the ObjectGridEventListener plug-in to receive notifications when significant events occur on an ObjectGrid. These events include ObjectGrid initialization, the beginning of a transaction, the ending a transaction, and destroying an ObjectGrid.To listen for these events, create a class that implements the ObjectGridEventListener interface and add it to the eXtreme Scale.
For more information about writing an ObjectGridEventListener plug-in, see ObjectGridEventListener plug-in. You can also refer to the API documentation for more information.
Add and removing ObjectGridEventListener instances An ObjectGrid can have multiple ObjectGridEventListener listeners. Add and remove the listeners using the addEventListener, setEventListeners and removeEventListener methods on the ObjectGrid interface. You can also declaratively registerObjectGridEventListener plug-ins with the ObjectGrid descriptor file. For examples, see ObjectGridEventListener plug-in.
MapEventListener plug-in
A MapEventListener plug-in provides callback notifications and significant cache state changes that occur for a BackingMap instance. For details on writing a MapEventListener plug-in, see MapEventListener plug-in. You can also refer to the API documentation for more information.
Add and removing MapEventListener instancesAn eXtreme Scale can have multiple MapEventListener listeners. Add and remove listeners with the addMapEventListener, setMapEventListeners and removeMapEventListener methods on the BackingMap interface. You can also declaratively register MapEventListener listeners with the ObjectGrid descriptor file. For examples, see MapEventListener plug-in.
- MapEventListener plug-in
A MapEventListener plug-in provides callback notifications and significant cache state changes that occur for a BackingMap object: when a map has finished pre-loading or when an entry is evicted from the map. A particular MapEventListener plug-in is a custom class you write implementing the MapEventListener interface.
- ObjectGridEventListener plug-in
An ObjectGridEventListener plug-in provides WebSphere eXtreme Scale life cycle events for the ObjectGrid, shards and transactions. An ObjectGridEventListener plug-in provides notifications when an ObjectGrid is initialized or destroyed, and when a transaction is started or ended. ObjectGridEventListener plug-ins are custom classes you write implementing the ObjectGridEventListener interface. Optionally, the implementation includes ObjectGridEventGroup sub-interfaces and follow the common eXtreme Scale plug-in conventions.
Parent topic:
Program with system APIs and plug-ins
Related concepts
Plug-ins for evicting cache objects
Plug-ins for transforming cached objects
Plug-ins for versioning and comparing cache objects
Plug-ins for custom indexing of cache objects
Plug-ins for communicating with persistent stores
Plug-ins for managing transaction life cycle events