Allows implementers to register callback methods that will be executed when a cache event occurs. The events include:
- put Element
- update Element
- remove Element
- evict Element
- an Element expires, either because timeToLive or timeToIdle has been reached.
- removeAll, which causes all elements to be cleared from the cache
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.
Cache also has putQuiet and removeQuiet methods which do not notify listeners.
@author Greg Luck
@version $Id: CacheEventListener.java 744 2008-08-16 20:10:49Z gregluck $
@see CacheManagerEventListener
@since 1.2