|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.alachisoft.ncache.web.caching.CacheItem
public class CacheItem
Class that represents a cached item including its dependencies, expiration and eviction information
Constructor Summary | |
---|---|
CacheItem(java.lang.Object value)
Constructor |
Method Summary | |
---|---|
java.lang.Object |
Clone()
If dependency or ItemUpdateCallbacks are used in this cacheItem then it is a shallow copy, else this clone method observes a deep clone |
java.util.Date |
getAbsoluteExpiration()
The time at which the added object expires and is removed from the cache. |
AsyncItemAddedCallback |
getAsyncItemAddedCallback()
An instance that, if provided, is called when an Asynchronous request for Add Operation completes. |
AsyncItemUpdatedCallback |
getAsyncItemUpdatedCallback()
An instance that, if provided, is called when an Asynchronous request for Update Operation completes. |
CacheDependency |
getCacheDependency()
The file or cache key dependencies for the item. |
CacheSyncDependency |
getCacheSyncDependency()
The cache key dependencies for the item. |
java.lang.String |
getGroup()
Group name, this caheItem is to be included in |
CacheItemRemovedCallback |
getItemRemoveCallback()
An instance that, if provided, is called when an object is removed from the cache. |
CacheItemUpdatedCallback |
getItemUpdateCallback()
An instance that, if provided, is called when an object is updated in the cache. |
NamedTagsDictionary |
getNamedTags()
|
CacheItemPriority |
getPriority()
The relative cost of the object, as expressed by the enumeration. |
boolean |
getResyncExpiredItems()
Gets a value indicating whether the object when expired will cause a re-fetch of the object from the master datasource. |
java.lang.String |
getResyncProviderName()
|
TimeSpan |
getSlidingExpiration()
The interval between the time the added object was last accessed and when that object expires. |
java.lang.String |
getSubGroup()
SubGroup name, this caheItem is to be included in |
Tag[] |
getTags()
gets all tags this CacheItem is attached to |
java.lang.Object |
getValue()
The payload for this item. |
CacheItemVersion |
getVersion()
Item version of the object, used when getCachItem is used on Cache |
void |
setAbsoluteExpiration(java.util.Date absoluteExpiration)
Sets the time at which the added object expires and is removed from the cache. |
void |
setAsyncItemAddedCallback(AsyncItemAddedCallback itemAddedCallback)
An instance that, if provided, is called when an Asynchronous request for Add Operation completes. |
void |
setAsyncItemUpdatedCallback(AsyncItemUpdatedCallback itemUpdatedCallback)
An instance that, if provided, is called when an Asynchronous request for Update Operation completes. |
void |
setCacheDependency(CacheDependency dependency)
|
void |
setCacheSyncDependency(CacheSyncDependency syncDependency)
The cache key dependencies for the item. |
void |
setGroup(java.lang.String group)
The name of the group to associate with the cache item. |
void |
setItemRemoveCallback(CacheItemRemovedCallback itemRemoveCallback)
An instance that, if provided, is called when an object is removed from the cache. |
void |
setItemUpdateCallback(CacheItemUpdatedCallback itemUpdateCallback)
An instance that, if provided, is called when an object is updated in the cache. |
void |
setNamedTags(NamedTagsDictionary namedTags)
|
void |
setPriority(CacheItemPriority priority)
|
void |
setPriority(int p)
Set priority using integer value |
void |
setResyncExpiredItems(boolean resync)
|
void |
setResyncProviderName(java.lang.String resyncProviderName)
|
void |
setSlidingExpiration(TimeSpan slidingExpiration)
|
void |
setSubGroup(java.lang.String subGroup)
The name of the sub-group within a group. |
void |
setTags(Tag[] tags)
sets all tags this CacheItem is to be attached to |
void |
setValue(java.lang.Object value)
|
void |
setVersion(CacheItemVersion version)
Sets Item Version |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CacheItem(java.lang.Object value)
value
- Actual object to be stored in cacheMethod Detail |
---|
public java.lang.Object Clone()
public java.util.Date getAbsoluteExpiration()
public AsyncItemAddedCallback getAsyncItemAddedCallback()
AsyncItemAddedCallback
public AsyncItemUpdatedCallback getAsyncItemUpdatedCallback()
AsyncItemUpdatedCallback
public CacheDependency getCacheDependency()
CacheDependency
public CacheSyncDependency getCacheSyncDependency()
CacheSyncDependency
public java.lang.String getGroup()
public CacheItemRemovedCallback getItemRemoveCallback()
CacheItemRemovedCallback
public CacheItemUpdatedCallback getItemUpdateCallback()
CacheItemUpdatedCallback
public NamedTagsDictionary getNamedTags()
public CacheItemPriority getPriority()
CacheItemPriority
public boolean getResyncExpiredItems()
public java.lang.String getResyncProviderName()
public TimeSpan getSlidingExpiration()
public java.lang.String getSubGroup()
public Tag[] getTags()
public java.lang.Object getValue()
public CacheItemVersion getVersion()
Cache
public void setAbsoluteExpiration(java.util.Date absoluteExpiration)
absoluteExpiration
- Sets the time at which the added object expires and is removed from the cache.public void setAsyncItemAddedCallback(AsyncItemAddedCallback itemAddedCallback)
itemAddedCallback
- AsyncItemAddedCallback
public void setAsyncItemUpdatedCallback(AsyncItemUpdatedCallback itemUpdatedCallback)
itemUpdatedCallback
- AsyncItemUpdatedCallback
public void setCacheDependency(CacheDependency dependency)
dependency
- Sets the CacheDependency
of this Item.
The file or cache key dependencies for the item. When any dependency changes, the object becomes invalid and is removed from the cache. If there are no dependencies, this property contains a null reference
CacheDependency
public void setCacheSyncDependency(CacheSyncDependency syncDependency)
syncDependency
- instance of CacheSyncDependencyCacheSyncDependency
public void setGroup(java.lang.String group)
group
- string, cannot be null of subgroup is existentpublic void setItemRemoveCallback(CacheItemRemovedCallback itemRemoveCallback)
itemRemoveCallback
- instance of the callbackCacheItemRemovedCallback
public void setItemUpdateCallback(CacheItemUpdatedCallback itemUpdateCallback)
itemUpdateCallback
- CacheItemUpdatedCallback
public void setNamedTags(NamedTagsDictionary namedTags)
namedTags
- Sets the value of the named tagspublic void setPriority(CacheItemPriority priority)
priority
- The relative cost of the object, as expressed by the enumeration.
The cache uses this value when it evicts objects; objects with a lower
cost are removed from the cache before objects with a higher cost.CacheItemPriority
public void setPriority(int p)
p
- CacheItemPriority
public void setResyncExpiredItems(boolean resync)
resync
- Sets a value indicating whether the object when expired will cause
a re-fetch of the object from the master datasource. (Resync Expired Items).public void setResyncProviderName(java.lang.String resyncProviderName)
resyncProviderName
- provider used for re-synchronization of itempublic void setSlidingExpiration(TimeSpan slidingExpiration)
slidingExpiration
- The interval between the time the added object was last accessed
and when that object expires. If this value is the equivalent of 20 minutes,
the object expires and is removed from the cache 20 minutes after it is last accessed.public void setSubGroup(java.lang.String subGroup)
subGroup
- string, cannot be null if group is existentpublic void setTags(Tag[] tags)
tags
- Array of tag names, cannot contain nullpublic void setValue(java.lang.Object value)
value
- Sets the value of the CacheItem.public void setVersion(CacheItemVersion version)
version
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |