com.sleepycat.je.txn
Class TxnPrepare

java.lang.Object
  extended by com.sleepycat.je.txn.TxnEnd
      extended by com.sleepycat.je.txn.TxnPrepare
All Implemented Interfaces:
Loggable

public class TxnPrepare
extends TxnEnd
implements Loggable

This class writes out a transaction prepare record.


Field Summary
 
Fields inherited from class com.sleepycat.je.txn.TxnEnd
id, time
 
Constructor Summary
TxnPrepare()
          For constructing from the log.
TxnPrepare(long id, Xid xid)
           
 
Method Summary
 void dumpLog(StringBuffer sb, boolean verbose)
          Write the object into the string buffer for log dumping.
 int getLogSize()
           
protected  String getTagName()
           
 Xid getXid()
           
 void readFromLog(ByteBuffer logBuffer, byte entryTypeVersion)
          Initialize this object from the data in itemBuf.
 void writeToLog(ByteBuffer logBuffer)
          Serialize this object into the buffer.
 
Methods inherited from class com.sleepycat.je.txn.TxnEnd
getId, getLastLsn, getTransactionId
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sleepycat.je.log.Loggable
getTransactionId
 

Constructor Detail

TxnPrepare

public TxnPrepare(long id,
                  Xid xid)

TxnPrepare

public TxnPrepare()
For constructing from the log.

Method Detail

getXid

public Xid getXid()

getTagName

protected String getTagName()
Specified by:
getTagName in class TxnEnd

getLogSize

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

writeToLog

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

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

readFromLog

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

Specified by:
readFromLog in interface Loggable
Overrides:
readFromLog in class TxnEnd
See Also:
Loggable.readFromLog(java.nio.ByteBuffer, byte)

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
Overrides:
dumpLog in class TxnEnd
Parameters:
sb - destination string buffer
verbose - if true, dump the full, verbose version
See Also:
Loggable.dumpLog(java.lang.StringBuffer, boolean)


Copyright 2004,2008 Oracle. All rights reserved.