com.sleepycat.je.tree
Class DeltaInfo

java.lang.Object
  extended bycom.sleepycat.je.tree.DeltaInfo
All Implemented Interfaces:
LogReadable, LogWritable

public class DeltaInfo
extends Object
implements LogWritable, LogReadable

DeltaInfo holds the delta for one BIN entry in a partial BIN log entry. The data here is all that we need to update a BIN to its proper state.


Constructor Summary
(package private) DeltaInfo()
          For reading from the log only.
(package private) DeltaInfo(Key key, long lsn, boolean knownDeleted)
           
 
Method Summary
 void dumpLog(StringBuffer sb, boolean verbose)
          Write the object into the string buffer for log dumping.
(package private)  Key getKey()
           
 int getLogSize()
           
(package private)  long getLsn()
           
 long getTransactionId()
           
(package private)  boolean isKnownDeleted()
           
 boolean logEntryIsTransactional()
           
 void readFromLog(ByteBuffer itemBuffer)
          Initialize this object from the data in itemBuf.
 void writeToLog(ByteBuffer logBuffer)
          Serialize this object into the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DeltaInfo

DeltaInfo(Key key,
          long lsn,
          boolean knownDeleted)

DeltaInfo

DeltaInfo()
For reading from the log only.

Method Detail

getLogSize

public int getLogSize()
Specified by:
getLogSize in interface LogWritable
Returns:
number of bytes used to store this object.

writeToLog

public void writeToLog(ByteBuffer logBuffer)
Description copied from interface: LogWritable
Serialize this object into the buffer.

Specified by:
writeToLog in interface LogWritable
Parameters:
logBuffer - is the destination buffer

readFromLog

public void readFromLog(ByteBuffer itemBuffer)
                 throws LogException
Description copied from interface: LogReadable
Initialize this object from the data in itemBuf.

Specified by:
readFromLog in interface LogReadable
Throws:
LogException

dumpLog

public void dumpLog(StringBuffer sb,
                    boolean verbose)
Description copied from interface: LogReadable
Write the object into the string buffer for log dumping. Each object should be dumped without indentation or new lines and should be valid XML.

Specified by:
dumpLog in interface LogReadable
Parameters:
sb - destination string buffer
verbose - if true, dump the full, verbose version

logEntryIsTransactional

public boolean logEntryIsTransactional()
Specified by:
logEntryIsTransactional in interface LogReadable
Returns:
true if the LogEntry is a transactional log entry type.
See Also:
LogReadable.logEntryIsTransactional()

getTransactionId

public long getTransactionId()
Specified by:
getTransactionId in interface LogReadable
Returns:
return the transaction id if this log entry is transactional, 0 otherwise.
See Also:
LogReadable.getTransactionId()

getKey

Key getKey()
Returns:
the Key.

isKnownDeleted

boolean isKnownDeleted()
Returns:
true if this is known to be deleted.

getLsn

long getLsn()
Returns:
the LSN.


Copyright 2004 Sleepycat, Inc. All Rights Reserved.