com.sleepycat.je.txn
Class TxnEnd
java.lang.Object
com.sleepycat.je.txn.TxnEnd
- All Implemented Interfaces:
- Loggable
- Direct Known Subclasses:
- TxnAbort, TxnCommit, TxnPrepare
public abstract class TxnEnd
- extends Object
- implements Loggable
This class writes out a transaction commit or transaction end record.
Constructor Summary |
TxnEnd()
For constructing from the log |
TxnEnd(long id,
long lastLsn,
int repMasterNodeId)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
protected long id
time
protected Timestamp time
repMasterNodeId
int repMasterNodeId
TxnEnd
TxnEnd(long id,
long lastLsn,
int repMasterNodeId)
TxnEnd
public TxnEnd()
- For constructing from the log
getId
public long getId()
getTime
public Timestamp getTime()
getLastLsn
long getLastLsn()
getMasterNodeId
public int getMasterNodeId()
getTagName
protected abstract String getTagName()
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 logBuffer)
- Description copied from interface:
Loggable
- Serialize this object into the buffer.
- Specified by:
writeToLog
in interface Loggable
- Parameters:
logBuffer
- is the destination buffer- See Also:
Loggable.writeToLog(java.nio.ByteBuffer)
readFromLog
public void readFromLog(ByteBuffer logBuffer,
int entryVersion)
- Description copied from interface:
Loggable
- Initialize this object from the data in itemBuf.
- Specified by:
readFromLog
in interface Loggable
- See Also:
Loggable.readFromLog(java.nio.ByteBuffer, int)
dumpLog
public void dumpLog(StringBuilder 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 bufferverbose
- if true, dump the full, verbose version- See Also:
Loggable.dumpLog(java.lang.StringBuilder, 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()
Copyright (c) 2004-2010 Oracle. All rights reserved.