com.sleepycat.je.utilint
Class VLSN

java.lang.Object
  extended by com.sleepycat.je.utilint.VLSN
All Implemented Interfaces:
Loggable

public class VLSN
extends Object
implements Loggable


Field Summary
static int LOG_SIZE
           
 
Constructor Summary
VLSN()
          Constructor for VLSNs that are read from disk.
VLSN(int generationId, int environmentId, long sequence)
           
 
Method Summary
 void dumpLog(StringBuffer sb, boolean verbose)
          Write the object into the string buffer for log dumping.
 int getContentSize()
           
 int getLogSize()
           
 long getTransactionId()
           
 void readFromBuffer(ByteBuffer buffer)
          BOZO, remove this
 void readFromLog(ByteBuffer buffer, byte entryTypeVersion)
          Initialize this object from the data in itemBuf.
 void writeToBuffer(ByteBuffer buffer)
           
 void writeToLog(ByteBuffer buffer)
          Serialize this object into the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG_SIZE

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

VLSN

public VLSN(int generationId,
            int environmentId,
            long sequence)

VLSN

public VLSN()
Constructor for VLSNs that are read from disk.

Method Detail

getLogSize

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

writeToLog

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

Specified by:
writeToLog in interface Loggable
Parameters:
buffer - is the destination buffer
See Also:
Loggable.writeToLog(java.nio.ByteBuffer)

readFromLog

public void readFromLog(ByteBuffer buffer,
                        byte entryTypeVersion)
                 throws LogException
Description copied from interface: Loggable
Initialize this object from the data in itemBuf.

Specified by:
readFromLog in interface Loggable
Throws:
LogException
See Also:
Loggable.writeToLog(java.nio.ByteBuffer)

dumpLog

public void dumpLog(StringBuffer sb,
                    boolean verbose)
Description copied from interface: Loggable
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 Loggable
Parameters:
sb - destination string buffer
verbose - if true, dump the full, verbose version
See Also:
Loggable.dumpLog(java.lang.StringBuffer, boolean)

getTransactionId

public long getTransactionId()
Specified by:
getTransactionId in interface Loggable
Returns:
the transaction id embedded within this loggable object. Objects that have no transaction id should return 0.
See Also:
Loggable.getTransactionId()

getContentSize

public int getContentSize()

writeToBuffer

public void writeToBuffer(ByteBuffer buffer)
Parameters:
buffer - is the destination buffer

readFromBuffer

public void readFromBuffer(ByteBuffer buffer)
                    throws LogException
BOZO, remove this

Throws:
LogException


Copyright 2004,2008 Oracle. All rights reserved.