org.fjank.jcache.persistence
Class PurgatoryElement

java.lang.Object
  extended byorg.fjank.jcache.persistence.PurgatoryElement
All Implemented Interfaces:
java.io.Serializable

public class PurgatoryElement
extends java.lang.Object
implements java.io.Serializable

Wrapper for cache elements in purgatory. Elements are stored in purgatory when they are spooled to the disk cache, but have not yet been written to disk.

See Also:
Serialized Form

Constructor Summary
PurgatoryElement(CacheObject cacheElement)
          Creates a new PurgatoryElement object.
 
Method Summary
 Attributes getAttributes()
          gets the attributes for the wrapped element
 CacheObject getCacheElement()
          gets the wrapped element
 java.io.Serializable getKey()
          gets the key
 java.lang.String getName()
          gets the name
 byte[] getVal()
          gets the wrapped element
 boolean isSpoolable()
          returns a boolean indicating wether this element is spoolable or not.
 void setAttributes(Attributes attr)
          sets the attributes for the wrapped element
 void setSpoolable(boolean spoolable)
          sets wether this element is spoolable or not.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PurgatoryElement

public PurgatoryElement(CacheObject cacheElement)
                 throws DiskCacheException
Creates a new PurgatoryElement object.

Parameters:
cacheElement - the cachelement to wrap.
Throws:
DiskCacheException
CacheNotAvailableException
Method Detail

isSpoolable

public boolean isSpoolable()
returns a boolean indicating wether this element is spoolable or not.

Returns:
a boolean indicating wether this element is spoolable or not.

setSpoolable

public void setSpoolable(boolean spoolable)
sets wether this element is spoolable or not.

Parameters:
spoolable - wether this element is spoolable or not.

getCacheElement

public CacheObject getCacheElement()
gets the wrapped element

Returns:
the wrapped element

getName

public java.lang.String getName()
gets the name

Returns:
the name

getKey

public java.io.Serializable getKey()
gets the key

Returns:
the key

getVal

public byte[] getVal()
gets the wrapped element

Returns:
the wrapped element

getAttributes

public Attributes getAttributes()
gets the attributes for the wrapped element

Returns:
the attributes for the wrapped element

setAttributes

public void setAttributes(Attributes attr)
sets the attributes for the wrapped element

Parameters:
attr - the attributes for the wrapped element


Copyright © 2002-2004 Hosted by SourceForge. All Rights Reserved.