public class RegisteredEventListeners
extends java.lang.Object
implements java.io.Serializable
构造器和说明 |
---|
RegisteredEventListeners(FRCache cache)
Constructs a new notification service
|
限定符和类型 | 方法和说明 |
---|---|
void |
clearCounters()
Clears all event counters
|
void |
dispose()
Tell listeners to dispose themselves.
|
java.util.Set |
getCacheEventListeners()
Gets a list of the listeners registered to this class
|
long |
getElementsEvictedCounter()
Gets the number of events, irrespective of whether there are any registered listeners.
|
long |
getElementsExpiredCounter()
Gets the number of events, irrespective of whether there are any registered listeners.
|
long |
getElementsPutCounter()
Gets the number of events, irrespective of whether there are any registered listeners.
|
long |
getElementsRemoveAllCounter()
Gets the number of events, irrespective of whether there are any registered listeners.
|
long |
getElementsRemovedCounter()
Gets the number of events, irrespective of whether there are any registered listeners.
|
long |
getElementsUpdatedCounter()
Gets the number of events, irrespective of whether there are any registered listeners.
|
boolean |
hasCacheEventListeners()
Returns whether or not at least one cache event listeners has been registered.
|
void |
notifyElementEvicted(Unity element)
Notifies all registered listeners, in no guaranteed order, that an element has been
evicted from the cache
|
void |
notifyElementExpiry(Unity element)
Notifies all registered listeners, in no guaranteed order, that an element has expired
|
void |
notifyElementPut(Unity element)
Notifies all registered listeners, in no guaranteed order, that an element was put into the cache
|
void |
notifyElementRemoved(Unity element)
Notifies all registered listeners, in no guaranteed order, that an element was removed
|
void |
notifyElementUpdated(Unity element)
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.
|
public RegisteredEventListeners(FRCache cache)
cache
- public final void notifyElementRemoved(Unity element) throws CacheException
element
- remoteEvent
- whether the event came from a remote cache peerCacheException
CacheEventListener.notifyElementRemoved(com.fr.cache.FRCache, com.fr.cache.Unity)
public final void notifyElementPut(Unity element) throws CacheException
element
- remoteEvent
- whether the event came from a remote cache peerCacheException
CacheEventListener#notifyElementPut(net.sf.ehcache.Ehcache,net.sf.ehcache.Element)
public final void notifyElementUpdated(Unity element)
element
- remoteEvent
- whether the event came from a remote cache peerCacheEventListener#notifyElementPut(net.sf.ehcache.Ehcache,net.sf.ehcache.Element)
public final void notifyElementExpiry(Unity element)
element
- the Element to perform the notification onremoteEvent
- whether the event came from a remote cache peerCacheEventListener.notifyElementExpired(com.fr.cache.FRCache, com.fr.cache.Unity)
public final boolean hasCacheEventListeners()
public void notifyElementEvicted(Unity element)
element
- the Element to perform the notification onremoteEvent
- whether the event came from a remote cache peerCacheEventListener.notifyElementEvicted(com.fr.cache.FRCache, com.fr.cache.Unity)
public void notifyRemoveAll(boolean remoteEvent)
remoteEvent
- whether the event came from a remote cache peerCacheEventListener.notifyElementEvicted(com.fr.cache.FRCache, com.fr.cache.Unity)
public final boolean registerListener(CacheEventListener cacheEventListener)
cacheEventListener
- public final boolean unregisterListener(CacheEventListener cacheEventListener)
cacheEventListener
- public final java.util.Set getCacheEventListeners()
CacheEventListener
public 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
在类中 java.lang.Object
public void clearCounters()
public long getElementsRemovedCounter()
public long getElementsPutCounter()
public long getElementsUpdatedCounter()
public long getElementsExpiredCounter()
public long getElementsEvictedCounter()
public long getElementsRemoveAllCounter()