Product Documentation : Ehcache Developer Guide : Cache Event Listeners : About Cache Event Listeners
About Cache Event Listeners
Cache listeners allow implementers to register callback methods that will be executed when a cache event occurs. Cache listeners implement the CacheEventListener interface. The events include:
*An Element has been put
*An Element has been updated. Updated means that an Element exists in the Cache with the same key as the Element being put.
*An Element has been removed
*An Element expires, either because timeToLive or timeToIdle have been reached.
Note:  
Callbacks to these methods are synchronous and unsynchronized.
It is the responsibility of the implementer to safely handle the potential performance and thread safety issues depending on what their listener is doing.
Listeners are guaranteed to be notified of events in the order in which they occurred. Elements can be put or removed from a Cache without notifying listeners by using the putQuiet() and removeQuiet() methods.
Copyright © 2010-2017 Software AG, Darmstadt, Germany. (Innovation Release)

Product Logo |   Feedback