Package com.alachisoft.ncache.client
Class EventCacheItem
- java.lang.Object
-
- com.alachisoft.ncache.client.EventCacheItem
-
- All Implemented Interfaces:
java.lang.Cloneable
public class EventCacheItem extends java.lang.Object implements java.lang.CloneableThis is a stripped down version ofCacheItem. Contains basic information of an item present in the cache
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Objectclone()Clones the event cache item instance.CacheItemPrioritygetCacheItemPriority()Gets CacheItemPriority of the item present in the cache.CacheItemVersiongetCacheItemVersion()Gets the ItemVersion of the item.com.alachisoft.ncache.common.caching.EntryTypegetEntryType()Gets the EntryType associated with the EventCacheItem.java.lang.StringgetGroup()Gets the group associated with the EventCacheItem.booleangetResyncExpiredItems()Specifies whether the items are to be resynced on expiration or not.ResyncOptionsgetResyncOptions()ResyncOptions contain information whether the items are to be ReSynced at expiry.<T> TgetValue(java.lang.Class<?> cls)Will contain the value present in the cache, but only if the event was registered against EventDataFilter.Metadata or EventDataFilter.DataWithMetadata, otherwise it will be null.
-
-
-
Method Detail
-
getValue
public final <T> T getValue(java.lang.Class<?> cls)
Will contain the value present in the cache, but only if the event was registered against EventDataFilter.Metadata or EventDataFilter.DataWithMetadata, otherwise it will be null.- Type Parameters:
T- Specifies the type of value obtained from the EventCacheItem.- Parameters:
cls- Specifies the class of value obtained from the EventCacheItem.- Returns:
- Type of the value present in the cache.
-
getCacheItemPriority
public final CacheItemPriority getCacheItemPriority()
Gets CacheItemPriority of the item present in the cache.- Returns:
- CacheItemPriority of the EventCacheItem.
-
getResyncOptions
public ResyncOptions getResyncOptions()
ResyncOptions contain information whether the items are to be ReSynced at expiry. It also specifies the Read Through Provider name.- Returns:
- The ResyncOptions specific to the EventCacheItem.
-
getResyncExpiredItems
public final boolean getResyncExpiredItems()
Specifies whether the items are to be resynced on expiration or not.- Returns:
- True, if item is to be resynced otherwise, false.
-
getGroup
public final java.lang.String getGroup()
Gets the group associated with the EventCacheItem.- Returns:
- The group associated with the EventCacheItem.
-
getCacheItemVersion
public final CacheItemVersion getCacheItemVersion()
Gets the ItemVersion of the item.
-
getEntryType
public com.alachisoft.ncache.common.caching.EntryType getEntryType()
Gets the EntryType associated with the EventCacheItem.- Returns:
- The EntryType associated with the EventCacheItem.
-
clone
public final java.lang.Object clone()
Clones the event cache item instance.- Returns:
- An event cache item instance.
- See Also:
Cloneable
-
-