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.Cloneable
This 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.Object
clone()
Clones the event cache item instance.CacheItemPriority
getCacheItemPriority()
Gets CacheItemPriority of the item present in the cache.CacheItemVersion
getCacheItemVersion()
Gets the ItemVersion of the item.com.alachisoft.ncache.common.caching.EntryType
getEntryType()
Gets the EntryType associated with the EventCacheItem.java.lang.String
getGroup()
Gets the group associated with the EventCacheItem.boolean
getResyncExpiredItems()
Specifies whether the items are to be resynced on expiration or not.ResyncOptions
getResyncOptions()
ResyncOptions contain information whether the items are to be ReSynced at expiry.<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.
-
-
-
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
-
-