com.ibm.di.btree
Class DBFile

java.lang.Object
  extended by com.ibm.di.btree.DBFile

public class DBFile
extends Object


Field Summary
 long last_offset
           
 
Constructor Summary
DBFile(String dbPath)
           
DBFile(String dbPath, Log log)
           
 
Method Summary
 void close()
           
 int computeSize(Object obj)
           
 void delete(Object key)
           
 void dumpDB(PrintStream out)
           
 void dumpDBStats(PrintStream out)
           
 void dumpStructure(PrintStream out, DBFile db, DBNode node, String indent)
           
 void dumpTree(String indent, DBFile db, DBNode node)
           
 int getBlockSize(long offset)
           
 DBEmptyBlock getEmptyBlock(Object obj)
           
 DBEnumeration getKeys()
           
 int getObjectSize(long offset)
           
 Object getProperty(Object p1)
           
 DBNode getRoot()
           
 DBEnumeration getValues()
           
 void insert(Object key, Object data)
           
 boolean isRoot(DBNode node)
           
 void logmsg(char debuglevel, String msg)
           
 void logmsg(String msg)
           
 void markEmpty(long offset)
           
 void printNode(long offset)
           
 void printNodeData(PrintStream out)
           
 Object readDataNode(long offset)
           
 void replace(Object key, Object value)
           
 long replaceObject(long offset, Object obj)
           
 Object search(Object key)
           
 void setProperty(Object p1, Object p2)
           
 long writeDataNode(long offset, Object obj)
           
 long writeDataNode(long offset, Object obj, int cursize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

last_offset

public long last_offset
Constructor Detail

DBFile

public DBFile(String dbPath)
       throws Exception
Throws:
Exception

DBFile

public DBFile(String dbPath,
              Log log)
       throws Exception
Throws:
Exception
Method Detail

close

public void close()
           throws IOException
Throws:
IOException

logmsg

public void logmsg(String msg)

logmsg

public void logmsg(char debuglevel,
                   String msg)

getRoot

public DBNode getRoot()
               throws Exception
Throws:
Exception

isRoot

public boolean isRoot(DBNode node)

readDataNode

public Object readDataNode(long offset)
                    throws Exception
Throws:
Exception

writeDataNode

public long writeDataNode(long offset,
                          Object obj)
                   throws Exception
Throws:
Exception

writeDataNode

public long writeDataNode(long offset,
                          Object obj,
                          int cursize)
                   throws Exception
Throws:
Exception

replaceObject

public long replaceObject(long offset,
                          Object obj)
                   throws Exception
Throws:
Exception

markEmpty

public void markEmpty(long offset)
               throws Exception
Throws:
Exception

getEmptyBlock

public DBEmptyBlock getEmptyBlock(Object obj)
                           throws Exception
Throws:
Exception

getBlockSize

public int getBlockSize(long offset)
                 throws Exception
Throws:
Exception

getObjectSize

public int getObjectSize(long offset)
                  throws IOException
Throws:
IOException

computeSize

public int computeSize(Object obj)
                throws IOException
Throws:
IOException

insert

public void insert(Object key,
                   Object data)
            throws Exception
Throws:
Exception

search

public Object search(Object key)
              throws Exception
Throws:
Exception

delete

public void delete(Object key)
            throws Exception
Throws:
Exception

replace

public void replace(Object key,
                    Object value)
             throws Exception
Throws:
Exception

getKeys

public DBEnumeration getKeys()
                      throws Exception
Throws:
Exception

getValues

public DBEnumeration getValues()
                        throws Exception
Throws:
Exception

getProperty

public Object getProperty(Object p1)
                   throws Exception
Throws:
Exception

setProperty

public void setProperty(Object p1,
                        Object p2)
                 throws Exception
Throws:
Exception

dumpTree

public void dumpTree(String indent,
                     DBFile db,
                     DBNode node)
              throws Exception
Throws:
Exception

dumpDB

public void dumpDB(PrintStream out)
            throws Exception
Throws:
Exception

printNode

public void printNode(long offset)
               throws Exception
Throws:
Exception

printNodeData

public void printNodeData(PrintStream out)
                   throws Exception
Throws:
Exception

dumpDBStats

public void dumpDBStats(PrintStream out)
                 throws Exception
Throws:
Exception

dumpStructure

public void dumpStructure(PrintStream out,
                          DBFile db,
                          DBNode node,
                          String indent)
                   throws Exception
Throws:
Exception