org.apache.jcs.engine.behavior
Interface ICacheElement<K extends Serializable,V extends Serializable>

All Superinterfaces:
Serializable
All Known Subinterfaces:
ICacheElementSerialized<K,V>
All Known Implementing Classes:
CacheElement, CacheElementSerialized, PurgatoryElement

public interface ICacheElement<K extends Serializable,V extends Serializable>
extends Serializable

Every item is the cache is wrapped in an ICacheElement. This contains information about the element: the region name, the key, the value, and the element attributes.

The element attributes have lots of useful information about each element, such as when they were created, how long they have to live, and if they are allowed to be spooled, etc.


Method Summary
 String getCacheName()
          Gets the cacheName attribute of the ICacheElement object.
 IElementAttributes getElementAttributes()
          Gets the attributes attribute of the ICacheElement object
 K getKey()
          Gets the key attribute of the ICacheElement object
 V getVal()
          Gets the val attribute of the ICacheElement object
 void setElementAttributes(IElementAttributes attr)
          Sets the attributes attribute of the ICacheElement object
 

Method Detail

getCacheName

String getCacheName()
Gets the cacheName attribute of the ICacheElement object. The cacheName is also known as the region name.

Returns:
The cacheName value

getKey

K getKey()
Gets the key attribute of the ICacheElement object

Returns:
The key value

getVal

V getVal()
Gets the val attribute of the ICacheElement object

Returns:
The val value

getElementAttributes

IElementAttributes getElementAttributes()
Gets the attributes attribute of the ICacheElement object

Returns:
The attributes value

setElementAttributes

void setElementAttributes(IElementAttributes attr)
Sets the attributes attribute of the ICacheElement object

Parameters:
attr - The new attributes value


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.