org.apache.jcs.auxiliary.disk.indexed
Class IndexedDiskElementDescriptor

java.lang.Object
  extended by org.apache.jcs.auxiliary.disk.indexed.IndexedDiskElementDescriptor
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable

public class IndexedDiskElementDescriptor
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Disk objects are located by descriptor entries. These are saved on shutdown and loaded into memory on startup.

See Also:
Serialized Form

Field Summary
 int len
          Number of bytes the serialized form of the cache data takes.
 
Constructor Summary
IndexedDiskElementDescriptor()
          Constructor for the DiskElementDescriptor object
IndexedDiskElementDescriptor(long pos, int len)
          Constructs a usable disk element descriptor.
 
Method Summary
 int compareTo(java.lang.Object o)
          Compares based on length.
 void init(long pos, byte[] data)
          Set the offset (i.e.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

len

public int len
Number of bytes the serialized form of the cache data takes.

Constructor Detail

IndexedDiskElementDescriptor

public IndexedDiskElementDescriptor()
Constructor for the DiskElementDescriptor object


IndexedDiskElementDescriptor

public IndexedDiskElementDescriptor(long pos,
                                    int len)
Constructs a usable disk element descriptor.

Parameters:
pos -
len -
Method Detail

init

public void init(long pos,
                 byte[] data)
Set the offset (i.e. position, and the size of the element)

Parameters:
pos -
data -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
debug string

compareTo

public int compareTo(java.lang.Object o)
Compares based on length.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - Object
Returns:
int


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