|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.ehcache.event.RegisteredEventListeners
public final class RegisteredEventListeners
Registered listeners for registering and unregistering CacheEventListeners and multicasting notifications to registrants.
There is one of these per Cache
| Constructor Summary | |
|---|---|
RegisteredEventListeners(Ehcache cache)
Constructs a new notification service |
|
| Method Summary | |
|---|---|
void |
dispose()
Tell listeners to dispose themselves. |
java.util.Set |
getCacheEventListeners()
Gets a list of the listeners registered to this class |
void |
notifyElementEvicted(Element element,
boolean remoteEvent)
Notifies all registered listeners, in no guaranteed order, that an element has been evicted from the cache |
void |
notifyElementExpiry(Element element,
boolean remoteEvent)
Notifies all registered listeners, in no guaranteed order, that an element has expired |
void |
notifyElementPut(Element element,
boolean remoteEvent)
Notifies all registered listeners, in no guaranteed order, that an element was put into the cache |
void |
notifyElementRemoved(Element element,
boolean remoteEvent)
Notifies all registered listeners, in no guaranteed order, that an element was removed |
void |
notifyElementUpdated(Element element,
boolean remoteEvent)
Notifies all registered listeners, in no guaranteed order, that an element in the cache was updated |
void |
notifyRemoveAll(boolean remoteEvent)
Notifies all registered listeners, in no guaranteed order, that removeAll has been called and all elements cleared |
boolean |
registerListener(CacheEventListener cacheEventListener)
Adds a listener to the notification service. |
java.lang.String |
toString()
Returns a string representation of the object. |
boolean |
unregisterListener(CacheEventListener cacheEventListener)
Removes a listener from the notification service. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public RegisteredEventListeners(Ehcache cache)
cache - | Method Detail |
|---|
public final void notifyElementRemoved(Element element,
boolean remoteEvent)
throws CacheException
element - remoteEvent - whether the event came from a remote cache peer
CacheExceptionCacheEventListener.notifyElementRemoved(net.sf.ehcache.Ehcache, net.sf.ehcache.Element)
public final void notifyElementPut(Element element,
boolean remoteEvent)
throws CacheException
element - remoteEvent - whether the event came from a remote cache peer
CacheExceptionCacheEventListener.notifyElementPut(net.sf.ehcache.Ehcache,net.sf.ehcache.Element)
public final void notifyElementUpdated(Element element,
boolean remoteEvent)
element - remoteEvent - whether the event came from a remote cache peerCacheEventListener.notifyElementPut(net.sf.ehcache.Ehcache,net.sf.ehcache.Element)
public final void notifyElementExpiry(Element element,
boolean remoteEvent)
element - the Element to perform the notification onremoteEvent - whether the event came from a remote cache peerCacheEventListener.notifyElementExpired(net.sf.ehcache.Ehcache, net.sf.ehcache.Element)
public void notifyElementEvicted(Element element,
boolean remoteEvent)
element - the Element to perform the notification onremoteEvent - whether the event came from a remote cache peerCacheEventListener.notifyElementEvicted(net.sf.ehcache.Ehcache, net.sf.ehcache.Element)public void notifyRemoveAll(boolean remoteEvent)
remoteEvent - whether the event came from a remote cache peerCacheEventListener.notifyElementEvicted(net.sf.ehcache.Ehcache, net.sf.ehcache.Element)public final boolean registerListener(CacheEventListener cacheEventListener)
cacheEventListener -
public final boolean unregisterListener(CacheEventListener cacheEventListener)
cacheEventListener -
public final java.util.Set getCacheEventListeners()
CacheEventListenerpublic final void dispose()
public final java.lang.String toString()
toString method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
toString in class java.lang.Object
|
ehcache | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||