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.
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 synchronously. That is, your callback
function will be called in the same thread that is emitting the event. This means that your listener should try to perform quick tasks to avoid blocking the original caller's thread.
If you do need to perform...