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

All Superinterfaces:
ICacheElement<K,V>, Serializable
All Known Implementing Classes:
CacheElementSerialized

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

This interface defines the behavior of the serialized element wrapper.

The value is stored as a byte array. This should allow for a variety of serialization mechanisms.

This currently extends ICacheElement for backward compatibility.

Author:
Aaron Smuts

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 ICacheElementSerialized object.
 byte[] getSerializedValue()
          Gets the value attribute of the ICacheElementSerialized object.
 void setElementAttributes(IElementAttributes attr)
          Sets the attributes attribute of the ICacheElement object
 
Methods inherited from interface org.apache.jcs.engine.behavior.ICacheElement
getVal
 

Method Detail

getCacheName

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

Specified by:
getCacheName in interface ICacheElement<K extends Serializable,V extends Serializable>
Returns:
The cacheName value

getKey

K getKey()
Gets the key attribute of the ICacheElementSerialized object. This is the standard key that the value can be reference by.

Specified by:
getKey in interface ICacheElement<K extends Serializable,V extends Serializable>
Returns:
The key value

getSerializedValue

byte[] getSerializedValue()
Gets the value attribute of the ICacheElementSerialized object. This is the value the client cached serialized by some mechanism.

Returns:
The serialized value

getElementAttributes

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

Specified by:
getElementAttributes in interface ICacheElement<K extends Serializable,V extends Serializable>
Returns:
The attributes value

setElementAttributes

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

Specified by:
setElementAttributes in interface ICacheElement<K extends Serializable,V extends Serializable>
Parameters:
attr - The new attributes value


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