Package com.alachisoft.ncache.client
Class CacheEventDescriptor
- java.lang.Object
-
- com.alachisoft.ncache.client.CacheEventDescriptor
-
public final class CacheEventDescriptor extends java.lang.ObjectInstance of this class holds the link to the registered delegate. Use it to unregister the registered delegate when required. The bool isRegistered returns false when the discriptor has been consumed to unregister the delegate. 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 CacheDataModificationListenergetCacheDataNotificationListener()Gets the listener that triggers when any data changes in cache.java.lang.StringgetCacheName()Name against which the cache is registered.EventDataFiltergetDataFilter()Gets the datafilter of the descriptor.booleangetIsRegistered()Returns true if the linked event delegate is registered, returns false when the descriptor has been consumed.java.util.EnumSet<EventType>getRegisteredAgainst()Gets the event types against which the descriptor is registered.voidsetCacheName(java.lang.String value)This method is intended to be called internally.voidsetDataFilter(EventDataFilter value)Sets the value of the EventDataFilter.voidsetIsRegistered(boolean value)This method is intended to be called internally.voidsetRegisteredAgainst(java.util.EnumSet<EventType> value)Sets the event types against which the descriptor is registered.voidsettCacheDataNotificationListener(CacheDataModificationListener listener)Sets the listener that triggers when any data changes in the 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 against which the cache is registered.
-
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 the data modification listener.
-
settCacheDataNotificationListener
public void settCacheDataNotificationListener(CacheDataModificationListener listener)
Sets the listener that triggers when any data changes in the cache.- Parameters:
listener- The instance of the data modification listener.
-
-