public class LNLogEntry extends BaseEntry implements LogEntry, NodeLogEntry
LN databaseid key abortLsn -- if transactional abortKnownDeleted -- if transactional txn -- if transactional (version 6) databaseid abortLsn -- if transactional abortKnownDeleted -- if transactional txn -- if transactional LN keyBefore version 6, a non-full-item read of a log entry only retrieved the node id. After version 6, the database id, transaction id and node id are all available.
| Constructor and Description |
|---|
LNLogEntry(java.lang.Class<? extends LN> LNClass) |
LNLogEntry(LogEntryType entryType,
LN ln,
DatabaseId dbId,
byte[] key,
long abortLsn,
boolean abortKnownDeleted,
Txn txn) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone() |
boolean |
countAsObsoleteWhenLogged()
Returns true for a deleted LN to count it immediately as obsolete.
|
java.lang.StringBuffer |
dumpEntry(java.lang.StringBuffer sb,
boolean verbose)
Print out the contents of an entry.
|
boolean |
getAbortKnownDeleted() |
long |
getAbortLsn() |
DatabaseId |
getDbId()
All node entries have a database ID.
|
byte[] |
getDupKey() |
byte[] |
getKey() |
int |
getLastLoggedSize()
Returns the last logged size, saved by readEntry and writeEntry.
|
LN |
getLN() |
java.lang.Object |
getMainItem() |
long |
getNodeId()
Returns the node ID.
|
int |
getSize()
#see LogEntry#getSize
|
long |
getTransactionId() |
java.lang.Long |
getTxnId() |
Txn |
getUserTxn() |
boolean |
logicalEquals(LogEntry other) |
void |
postLogWork(long justLoggedLsn)
For LN entries, we need to record the latest LSN for that node with the
owning transaction, within the protection of the log latch.
|
void |
readEntry(LogEntryHeader header,
java.nio.ByteBuffer entryBuffer,
boolean readFullItem)
Read in a log entry.
|
void |
writeEntry(LogEntryHeader header,
java.nio.ByteBuffer destBuffer)
Serialize this object into the buffer.
|
getLogType, setLogType, toStringequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetLogType, setLogTypepublic LNLogEntry(java.lang.Class<? extends LN> LNClass)
public LNLogEntry(LogEntryType entryType, LN ln, DatabaseId dbId, byte[] key, long abortLsn, boolean abortKnownDeleted, Txn txn)
public void readEntry(LogEntryHeader header, java.nio.ByteBuffer entryBuffer, boolean readFullItem) throws DatabaseException
LogEntryreadEntry in interface LogEntryDatabaseExceptionLogEntry.readEntry(com.sleepycat.je.log.LogEntryHeader, java.nio.ByteBuffer, boolean)public java.lang.StringBuffer dumpEntry(java.lang.StringBuffer sb,
boolean verbose)
LogEntrydumpEntry in interface LogEntrydumpEntry in class BaseEntryLogEntry.dumpEntry(java.lang.StringBuffer, boolean)public java.lang.Object getMainItem()
getMainItem in interface LogEntryLogEntry.getMainItem()public java.lang.Object clone()
throws java.lang.CloneNotSupportedException
clone in interface LogEntryclone in class java.lang.Objectjava.lang.CloneNotSupportedExceptionLogEntry.clone()public long getTransactionId()
getTransactionId in interface LogEntryLogEntry.getTransactionId()public long getNodeId()
NodeLogEntrygetNodeId in interface NodeLogEntryNodeLogEntry.getNodeId()public int getSize()
public int getLastLoggedSize()
getLastLoggedSize in interface LogEntrygetLastLoggedSize in class BaseEntrypublic void writeEntry(LogEntryHeader header, java.nio.ByteBuffer destBuffer)
LogEntrywriteEntry in interface LogEntrydestBuffer - is the destination bufferLogEntry.writeEntry(com.sleepycat.je.log.LogEntryHeader, java.nio.ByteBuffer)public boolean countAsObsoleteWhenLogged()
countAsObsoleteWhenLogged in interface LogEntrycountAsObsoleteWhenLogged in class BaseEntryLogEntry.countAsObsoleteWhenLogged()public void postLogWork(long justLoggedLsn)
throws DatabaseException
postLogWork in interface LogEntrypostLogWork in class BaseEntryDatabaseExceptionLogEntry.postLogWork(long)public LN getLN()
public DatabaseId getDbId()
NodeLogEntrygetDbId in interface NodeLogEntrypublic byte[] getKey()
public byte[] getDupKey()
public long getAbortLsn()
public boolean getAbortKnownDeleted()
public java.lang.Long getTxnId()
public Txn getUserTxn()
public boolean logicalEquals(LogEntry other)
logicalEquals in interface LogEntryLogEntry.logicalEquals(com.sleepycat.je.log.entry.LogEntry)Copyright (c) 2004,2008 Oracle. All rights reserved.