public class ErasedLogEntry extends Object implements LogEntry
LogEntryType.LOG_ERASED and its item bytes are set to zero. However,
an entry may be partially erased, in which case isAllZeros()
returns false.
The original entry type is lost, but the other fields of the header are left
in place. The item size, previous offset, VLSN and flags are left intact.
The checksum field is left intact, but is no longer valid.DataEraser| Constructor and Description |
|---|
ErasedLogEntry() |
| Modifier and Type | Method and Description |
|---|---|
ErasedLogEntry |
clone() |
StringBuilder |
dumpEntry(StringBuilder sb,
boolean verbose)
Print out the contents of an entry.
|
void |
dumpRep(StringBuilder sb)
Dump the contents of the log entry that are interesting for
replication.
|
DatabaseId |
getDbId() |
LogEntryType |
getLogType() |
Object |
getMainItem() |
Object |
getResolvedItem(DatabaseImpl dbImpl)
Construct a complete item from a item entry, fetching additional log
entries as needed to ensure that a usable main object is available.
|
int |
getSize() |
long |
getTransactionId() |
boolean |
isAllZeros()
Returns whether the item bytes are all zeros, meaning that erasure of
this entry is complete.
|
boolean |
isDeleted()
Returns whether this is a deleted LN.
|
boolean |
isImmediatelyObsolete(DatabaseImpl dbImpl)
Returns true if this item should be counted as obsolete when logged.
|
boolean |
logicalEquals(LogEntry other) |
void |
postLogWork(LogEntryHeader header,
long justLoggedLsn,
VLSN vlsn)
Do any processing we need to do after logging, while under the logging
latch.
|
void |
readEntry(EnvironmentImpl envImpl,
LogEntryHeader header,
ByteBuffer entryBuffer)
Read in a log entry.
|
void |
setLogType(LogEntryType entryType)
Inform a LogEntry instance of its corresponding LogEntryType.
|
void |
writeEntry(ByteBuffer logBuffer)
Serialize this object into the buffer.
|
public int getSize()
public void writeEntry(ByteBuffer logBuffer)
LogEntrywriteEntry in interface LogEntrylogBuffer - is the destination bufferpublic boolean isImmediatelyObsolete(DatabaseImpl dbImpl)
LogEntryisImmediatelyObsolete in interface LogEntrypublic boolean isDeleted()
LogEntrypublic void postLogWork(LogEntryHeader header, long justLoggedLsn, VLSN vlsn)
LogEntrypostLogWork in interface LogEntrypublic ErasedLogEntry clone()
public void setLogType(LogEntryType entryType)
LogEntrysetLogType in interface LogEntrypublic LogEntryType getLogType()
getLogType in interface LogEntrypublic void readEntry(EnvironmentImpl envImpl, LogEntryHeader header, ByteBuffer entryBuffer)
LogEntrypublic StringBuilder dumpEntry(StringBuilder sb, boolean verbose)
LogEntrypublic boolean isAllZeros()
public Object getMainItem()
getMainItem in interface LogEntrypublic Object getResolvedItem(DatabaseImpl dbImpl)
LogEntrygetResolvedItem in interface LogEntrypublic DatabaseId getDbId()
public long getTransactionId()
getTransactionId in interface LogEntrypublic boolean logicalEquals(LogEntry other)
logicalEquals in interface LogEntrypublic void dumpRep(StringBuilder sb)
LogEntryCopyright © 2024. All rights reserved.