public class CacheItem<K,V> extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
static org.apache.log4j.Category |
LOGGER |
Constructor and Description |
---|
CacheItem(K id,
V object) |
CacheItem(V object) |
Modifier and Type | Method and Description |
---|---|
void |
addedToCache(String cacheType)
When the cache item is added to a Cache, it receives a notification of
this, and will pass on the notification to the object in question.
|
K |
getId()
Get the id of this CacheItem
|
long |
getLastAccess()
Get the time this CacheItem was last accessed.
|
long |
getLastUpdate()
Get the time this CacheItem was last updated.
|
V |
getObject()
Get the object that this CacheItem is representing.
|
void |
removedFromCache(String cacheType)
When the cache item is removed from a Cache, it receives a notification of
this, and will pass on the notification to the object in question.
|
void |
setLastAccess(long lastAccess)
Set the time this CacheItem was last accessed.
|
String |
toString() |
public V getObject()
public void setLastAccess(long lastAccess)
public long getLastAccess()
public long getLastUpdate()
public K getId()
public void addedToCache(String cacheType)
CacheObjectListener
interface.
If the CacheObjectListener interface is implemented, its addedToCache method is called,
indicating that the item was added to a cache of the specified cache typepublic void removedFromCache(String cacheType)
CacheObjectListener
interface.
If the CacheObjectListener interface is implemented, its removedFromCache method is called,
indicating that the item was removed from a cache of the specified cache type© 1998- 2021 Escenic AS