com.caucho.db.index
Class IndexKey

java.lang.Object
  extended by com.caucho.db.index.IndexKey
All Implemented Interfaces:
LruListener

public final class IndexKey
extends java.lang.Object
implements LruListener

Key to the front-end btree cache


Constructor Summary
IndexKey()
           
IndexKey(BTree btree, byte[] data, int offset, int length, long value)
           
 
Method Summary
static IndexKey create(BTree btree, byte[] data, int offset, int length, long value)
           
 boolean equals(java.lang.Object o)
           
 BTree getBTree()
           
 byte[] getBuffer()
           
 int getLength()
           
 int getOffset()
           
 long getValue()
           
 int hashCode()
           
 void init(BTree btree, byte[] data, int offset, int length)
           
 boolean isStored()
           
 boolean isValid()
           
 void lruEvent()
           
 void setStored(boolean isStored)
           
 void setValid(boolean isValid)
           
 void setValue(long value)
           
 java.lang.String toString()
           
 void update()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

IndexKey

public IndexKey()

IndexKey

public IndexKey(BTree btree,
                byte[] data,
                int offset,
                int length,
                long value)
Method Detail

create

public static IndexKey create(BTree btree,
                              byte[] data,
                              int offset,
                              int length,
                              long value)

init

public void init(BTree btree,
                 byte[] data,
                 int offset,
                 int length)

getBTree

public BTree getBTree()

getBuffer

public byte[] getBuffer()

getOffset

public int getOffset()

getLength

public int getLength()

setValue

public void setValue(long value)

getValue

public long getValue()

isValid

public boolean isValid()

setValid

public void setValid(boolean isValid)

isStored

public boolean isStored()

setStored

public void setStored(boolean isStored)

lruEvent

public void lruEvent()
Specified by:
lruEvent in interface LruListener

update

public void update()

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

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