Package com.alachisoft.ncache.client
Class CacheEventDescriptor
- java.lang.Object
-
- com.alachisoft.ncache.client.CacheEventDescriptor
-
public final class CacheEventDescriptor extends java.lang.Object
Instance of this class holds the link to the registered delegate Keep it safe and use it to unregister the registered delegate when required. The bool isRegistered returns false when the discriptor has been consumed to unregister the delegate. Then this instance can then be disposed of. Upon re-registering for the interested event, a new discriptor will be created.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CacheDataModificationListener
getCacheDataNotificationListener()
Gets the Listener that triggers when any data changes in cache.java.lang.String
getCacheName()
Name of the cache registered againstEventDataFilter
getDataFilter()
Gets the datafilter of the descriptor.boolean
getIsRegistered()
Returns true if the linked event delegate is registered, returns false when the descriptor has been consumed This property is ThreadSafe.java.util.EnumSet<EventType>
getRegisteredAgainst()
Gets the Event Types against which the descriptor is registered.void
setCacheName(java.lang.String value)
This method is intended to be called internally.void
setDataFilter(EventDataFilter value)
Sets the value of the EventDataFilter.void
setIsRegistered(boolean value)
This method is intended to be called internally.void
setRegisteredAgainst(java.util.EnumSet<EventType> value)
Sets the Event Types against which the descriptor is registered.void
settCacheDataNotificationListener(CacheDataModificationListener listener)
Sets the Listener that triggers when any data changes in cache.
-
-
-
Method Detail
-
getDataFilter
public EventDataFilter getDataFilter()
Gets the datafilter of the descriptor.- Returns:
- EventDataFilter value of the descriptor.
-
setDataFilter
public void setDataFilter(EventDataFilter value)
Sets the value of the EventDataFilter.- Parameters:
value
- EventDataFilter value.
-
getIsRegistered
public boolean getIsRegistered()
Returns true if the linked event delegate is registered, returns false when the descriptor has been consumed This property is ThreadSafe.- Returns:
- If descriptor is registered or not.
-
setIsRegistered
public void setIsRegistered(boolean value)
This method is intended to be called internally.- Parameters:
value
-
-
getCacheName
public java.lang.String getCacheName()
Name of the cache registered against
-
setCacheName
public void setCacheName(java.lang.String value)
This method is intended to be called internally.- Parameters:
value
-
-
getRegisteredAgainst
public java.util.EnumSet<EventType> getRegisteredAgainst()
Gets the Event Types against which the descriptor is registered.- Returns:
- The enumset containing all the registered event types.
-
setRegisteredAgainst
public void setRegisteredAgainst(java.util.EnumSet<EventType> value)
Sets the Event Types against which the descriptor is registered.- Parameters:
value
- The enumset containing all the registered event types.
-
getCacheDataNotificationListener
public CacheDataModificationListener getCacheDataNotificationListener()
Gets the Listener that triggers when any data changes in cache.- Returns:
- The instance of data modification listener.
-
settCacheDataNotificationListener
public void settCacheDataNotificationListener(CacheDataModificationListener listener)
Sets the Listener that triggers when any data changes in cache.- Parameters:
listener
- The instance of data modification listener.
-
-