com.sleepycat.je.txn
Class TxnPrepare
java.lang.Object
com.sleepycat.je.txn.TxnEnd
com.sleepycat.je.txn.TxnPrepare
- All Implemented Interfaces:
- Loggable
public class TxnPrepare
- extends TxnEnd
- implements Loggable
This class writes out a transaction prepare record.
Fields inherited from class com.sleepycat.je.txn.TxnEnd |
id, time |
Constructor Summary |
TxnPrepare()
For constructing from the log. |
TxnPrepare(long id,
javax.transaction.xa.Xid xid)
|
Method Summary |
void |
dumpLog(java.lang.StringBuffer sb,
boolean verbose)
Write the object into the string buffer for log dumping. |
int |
getLogSize()
|
protected java.lang.String |
getTagName()
|
javax.transaction.xa.Xid |
getXid()
|
void |
readFromLog(java.nio.ByteBuffer logBuffer,
byte entryTypeVersion)
Initialize this object from the data in itemBuf. |
void |
writeToLog(java.nio.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 |
TxnPrepare
public TxnPrepare(long id,
javax.transaction.xa.Xid xid)
TxnPrepare
public TxnPrepare()
- For constructing from the log.
getXid
public javax.transaction.xa.Xid getXid()
getTagName
protected java.lang.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(java.nio.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(java.nio.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(java.lang.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 bufferverbose
- if true, dump the full, verbose version- See Also:
Loggable.dumpLog(java.lang.StringBuffer, boolean)
Copyright 2004,2008 Oracle. All rights reserved.