org.apache.jcs.engine
Class CacheElementSerialized

java.lang.Object
  extended by org.apache.jcs.engine.CacheElementSerialized
All Implemented Interfaces:
Serializable, ICacheElement, ICacheElementSerialized

public class CacheElementSerialized
extends Object
implements ICacheElementSerialized

Either serialized value or the value should be null;

See Also:
Serialized Form

Constructor Summary
CacheElementSerialized(String cacheNameArg, Serializable keyArg, byte[] serializedValueArg, IElementAttributes elementAttributesArg)
          Constructs a usable wrapper.
 
Method Summary
 String getCacheName()
          Returns the name of the cache.
 IElementAttributes getElementAttributes()
          Gets the attributes attribute of the ICacheElement object
 Serializable getKey()
          Gets the key attribute of the ICacheElementSerialized object.
 byte[] getSerializedValue()
          Gets the value attribute of the ICacheElementSerialized object.
 Serializable getVal()
          Backward compatibility.
 void setElementAttributes(IElementAttributes attr)
          Sets the attributes attribute of the ICacheElement object
 String toString()
          For debugging only.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CacheElementSerialized

public CacheElementSerialized(String cacheNameArg,
                              Serializable keyArg,
                              byte[] serializedValueArg,
                              IElementAttributes elementAttributesArg)
Constructs a usable wrapper.

Parameters:
cacheNameArg -
keyArg -
serializedValueArg -
elementAttributesArg -
Method Detail

getCacheName

public String getCacheName()
Returns the name of the cache. This is the name of the region.

Specified by:
getCacheName in interface ICacheElement
Specified by:
getCacheName in interface ICacheElementSerialized
Returns:
this.cacheName;

getKey

public Serializable getKey()
Description copied from interface: ICacheElementSerialized
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
Specified by:
getKey in interface ICacheElementSerialized
Returns:
Serializable

getSerializedValue

public byte[] getSerializedValue()
Description copied from interface: ICacheElementSerialized
Gets the value attribute of the ICacheElementSerialized object. This is the value the client cached serialized by some mechanism.

Specified by:
getSerializedValue in interface ICacheElementSerialized
Returns:
byte[]

getElementAttributes

public IElementAttributes getElementAttributes()
Description copied from interface: ICacheElementSerialized
Gets the attributes attribute of the ICacheElement object

Specified by:
getElementAttributes in interface ICacheElement
Specified by:
getElementAttributes in interface ICacheElementSerialized
Returns:
IElementAttributes

setElementAttributes

public void setElementAttributes(IElementAttributes attr)
Description copied from interface: ICacheElementSerialized
Sets the attributes attribute of the ICacheElement object

Specified by:
setElementAttributes in interface ICacheElement
Specified by:
setElementAttributes in interface ICacheElementSerialized
Parameters:
attr -

getVal

public Serializable getVal()
Backward compatibility.

Specified by:
getVal in interface ICacheElement
Returns:
Serializable

toString

public String toString()
For debugging only.

Overrides:
toString in class Object
Returns:
debugging string.


Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.