org.siebengeisslein.core
Class BTree

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

public class BTree
extends java.lang.Object


Field Summary
static int DEPTH
           
static java.lang.String EXT_OBJID
           
 
Constructor Summary
BTree(Config config, TransactionManager transactionManager, WriteBufferPool writePool, CoreTransactionSequence seq, boolean create)
           
 
Method Summary
 void close()
           
 void commit()
           
 void compressStore(DataStoreImpl store)
           
protected  CoreTransaction createTransaction(GCState gcState)
          This method is provided, so Transaction-creation can be overriden (usefull for testing).
 BTreeNodeCache getCache()
           
 FreeBlockList getFBL()
           
 java.util.SortedMap<java.lang.Long,java.lang.Long> getGarbageObjects()
           
 long getObjID(FlushThread flushThread, GCState gcState)
           
 long getObjIDs(int count, FlushThread flushThread, GCState gcState)
           
 java.util.Set<java.lang.Long> getReferencedOIDs()
           
 long getValue(long oid)
           
 long incObjIDs(int count, FlushThread flushThread, GCState gcState)
           
 void recovered()
           
 void remove(long oid)
           
 void removeAllGCFlags()
           
 void setGCEvaluated(long oid)
           
 void setGCReferenced(long oid)
           
 void setValue(long oid, long value, boolean gcRunning)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EXT_OBJID

public static final java.lang.String EXT_OBJID
See Also:
Constant Field Values

DEPTH

public static final int DEPTH
See Also:
Constant Field Values
Constructor Detail

BTree

public BTree(Config config,
             TransactionManager transactionManager,
             WriteBufferPool writePool,
             CoreTransactionSequence seq,
             boolean create)
      throws java.io.IOException
Throws:
java.io.IOException
Method Detail

recovered

public void recovered()
               throws java.io.IOException
Throws:
java.io.IOException

getCache

public BTreeNodeCache getCache()

getFBL

public FreeBlockList getFBL()

createTransaction

protected CoreTransaction createTransaction(GCState gcState)
                                     throws java.io.IOException
This method is provided, so Transaction-creation can be overriden (usefull for testing). TODO: Move this method to some sensible place !?!

Throws:
java.io.IOException

getObjID

public long getObjID(FlushThread flushThread,
                     GCState gcState)
              throws java.io.IOException
Throws:
java.io.IOException

getObjIDs

public long getObjIDs(int count,
                      FlushThread flushThread,
                      GCState gcState)
               throws java.io.IOException
Throws:
java.io.IOException

incObjIDs

public long incObjIDs(int count,
                      FlushThread flushThread,
                      GCState gcState)
               throws java.io.IOException
Throws:
java.io.IOException

getValue

public long getValue(long oid)
              throws java.io.IOException,
                     UnknownOIDException
Throws:
java.io.IOException
UnknownOIDException

setValue

public void setValue(long oid,
                     long value,
                     boolean gcRunning)
              throws java.io.IOException,
                     UnknownOIDException
Throws:
java.io.IOException
UnknownOIDException

close

public void close()
           throws java.io.IOException
Throws:
java.io.IOException

commit

public void commit()
            throws java.io.IOException
Throws:
java.io.IOException

setGCReferenced

public void setGCReferenced(long oid)
                     throws UnknownOIDException,
                            java.io.IOException
Throws:
UnknownOIDException
java.io.IOException

setGCEvaluated

public void setGCEvaluated(long oid)
                    throws UnknownOIDException,
                           java.io.IOException
Throws:
UnknownOIDException
java.io.IOException

removeAllGCFlags

public void removeAllGCFlags()
                      throws java.io.IOException
Throws:
java.io.IOException

getGarbageObjects

public java.util.SortedMap<java.lang.Long,java.lang.Long> getGarbageObjects()
                                                                     throws java.io.IOException
Throws:
java.io.IOException

getReferencedOIDs

public java.util.Set<java.lang.Long> getReferencedOIDs()
                                                throws java.io.IOException
Throws:
java.io.IOException

compressStore

public void compressStore(DataStoreImpl store)
                   throws java.io.IOException
Throws:
java.io.IOException

remove

public void remove(long oid)
            throws UnknownOIDException,
                   java.io.IOException
Throws:
UnknownOIDException
java.io.IOException