org.siebengeisslein.core
Class BTreeNode

java.lang.Object
  extended by org.siebengeisslein.core.BTreeNode

public class BTreeNode
extends java.lang.Object


Field Summary
static int BYTE_NODE_SIZE
           
static int BYTES_PER_LONG
           
static long INVALID
           
static int MAX_ENTRIES
           
static int NODE_SIZE
           
static int OID_START_IDX
           
static int VALUE_START_IDX
           
 
Constructor Summary
BTreeNode()
           
 
Method Summary
 void addGarbage(java.util.SortedMap<java.lang.Long,java.lang.Long> result)
           
 void addReferenced(java.util.Set<java.lang.Long> result)
           
 void addValue(long oid, long value)
           
 int findIndex(long oid, boolean exact)
           
 long getAddLockIndex()
           
 long getLastValue()
           
 int getSize()
           
 long getValue(long oid, boolean exact)
           
 long getValueAtIndex(int index)
           
 void init()
           
 void init(long startOID)
           
 void merge(BTreeNode node)
           
 void moveEntries(DataStore store)
           
 void read(java.nio.channels.ReadableByteChannel channel)
           
 void removeIndex(int index)
           
 void removeOID(long oid)
           
 void resetAllGCFlags()
           
 void setValue(long oid, long value)
           
 void write(java.nio.channels.WritableByteChannel channel)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NODE_SIZE

public static final int NODE_SIZE
See Also:
Constant Field Values

MAX_ENTRIES

public static final int MAX_ENTRIES
See Also:
Constant Field Values

BYTES_PER_LONG

public static final int BYTES_PER_LONG
See Also:
Constant Field Values

BYTE_NODE_SIZE

public static final int BYTE_NODE_SIZE
See Also:
Constant Field Values

OID_START_IDX

public static final int OID_START_IDX
See Also:
Constant Field Values

VALUE_START_IDX

public static final int VALUE_START_IDX
See Also:
Constant Field Values

INVALID

public static final long INVALID
See Also:
Constant Field Values
Constructor Detail

BTreeNode

public BTreeNode()
Method Detail

init

public void init()

init

public void init(long startOID)

write

public void write(java.nio.channels.WritableByteChannel channel)
           throws java.io.IOException
Throws:
java.io.IOException

read

public void read(java.nio.channels.ReadableByteChannel channel)
          throws java.io.IOException
Throws:
java.io.IOException

setValue

public void setValue(long oid,
                     long value)
              throws UnknownOIDException
Throws:
UnknownOIDException

getValue

public long getValue(long oid,
                     boolean exact)
              throws UnknownOIDException
Throws:
UnknownOIDException

getAddLockIndex

public long getAddLockIndex()

getValueAtIndex

public long getValueAtIndex(int index)

addValue

public void addValue(long oid,
                     long value)

getSize

public int getSize()

getLastValue

public long getLastValue()

findIndex

public int findIndex(long oid,
                     boolean exact)
              throws UnknownOIDException
Throws:
UnknownOIDException

merge

public void merge(BTreeNode node)

resetAllGCFlags

public void resetAllGCFlags()

addReferenced

public void addReferenced(java.util.Set<java.lang.Long> result)

addGarbage

public void addGarbage(java.util.SortedMap<java.lang.Long,java.lang.Long> result)

removeIndex

public void removeIndex(int index)

removeOID

public void removeOID(long oid)
               throws UnknownOIDException
Throws:
UnknownOIDException

moveEntries

public void moveEntries(DataStore store)
                 throws java.io.IOException
Throws:
java.io.IOException