org.apache.jcs.engine
Class CacheElementSerialized

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

public class CacheElementSerialized
extends java.lang.Object
implements ICacheElementSerialized

Either serialized value or the value should be null;

See Also:
Serialized Form

Constructor Summary
CacheElementSerialized(java.lang.String cacheNameArg, java.io.Serializable keyArg, byte[] serializedValueArg, IElementAttributes elementAttributesArg)
          Constructs a usable wrapper.
 
Method Summary
 java.lang.String getCacheName()
          Returns the name of the cache.
 IElementAttributes getElementAttributes()
          Gets the attributes attribute of the ICacheElement object
 java.io.Serializable getKey()
          Gets the key attribute of the ICacheElement object
 byte[] getSerializedValue()
          Gets the value attribute of the ICacheElementSerialized object.
 java.io.Serializable getVal()
          Backward compatibility.
 void setElementAttributes(IElementAttributes attr)
          Sets the attributes attribute of the ICacheElement object
 java.lang.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(java.lang.String cacheNameArg,
                              java.io.Serializable keyArg,
                              byte[] serializedValueArg,
                              IElementAttributes elementAttributesArg)
Constructs a usable wrapper.

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

getCacheName

public java.lang.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:
The cacheName value

getKey

public java.io.Serializable getKey()
Description copied from interface: ICacheElement
Gets the key attribute of the ICacheElement object

Specified by:
getKey in interface ICacheElement
Specified by:
getKey in interface ICacheElementSerialized
Returns:
The key value

getSerializedValue

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

Specified by:
getSerializedValue in interface ICacheElementSerialized
Returns:
The serialized value

getElementAttributes

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

Specified by:
getElementAttributes in interface ICacheElement
Specified by:
getElementAttributes in interface ICacheElementSerialized
Returns:
The attributes value

setElementAttributes

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

Specified by:
setElementAttributes in interface ICacheElement
Specified by:
setElementAttributes in interface ICacheElementSerialized
Parameters:
attr - The new attributes value

getVal

public java.io.Serializable getVal()
Backward compatibility.

Specified by:
getVal in interface ICacheElement
Returns:
The val value

toString

public java.lang.String toString()
For debugging only.

Overrides:
toString in class java.lang.Object


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