O'Reilly logo

Infinispan Data Grid Platform Definitive Guide by Wagner Roberto dos Santos

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing event listeners and notifications

It is often useful for the application be aware of some events that occur inside the grid. It provides a better separation of responsibilities and allows developers to implement more generic features and the extension of built-in functionality. Infinispan provides an event notification system for this purpose; this mechanism allows you to register listeners to detect when events take place.

The listener API

Cache-level events such as entries being added, removed, or modified in a specific cache, can trigger a notification that is dispatched to listeners registered to one single cache.

By default, Infinispan will synchronously dispatch the notification to the method object.

Notifications are by default, dispatched ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required