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 instances

An 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.


Parent topic:

Program with system APIs and plug-ins


Related concepts

Introduction to plug-ins

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


+

Search Tips   |   Advanced Search