public class INLogEntry<T extends IN> extends Object implements LogEntry, INContainingEntry
(3 <= version < 6)
IN
database id
prevFullLsn -- in version 2
(6 <= version < 8)
database id
prevFullLsn
IN
(8 <= version)
database id
prevFullLsn
prevDeltaLsn
IN
On disk, a BIN-delta logrec written via the BINDeltaLogEntry contains:
(version == 9)
database id
prevFullLsn -- always NULL
prevDeltaLsn
BIN (dirty slots only)
prevFullLsn
(version >= 10)
database id
prevFullLsn
prevDeltaLsn
BIN (dirty slots only and including the new fullBinNEntries and
fullBinMaxEntries fields)
| Constructor and Description |
|---|
INLogEntry(ByteBuffer bytes,
long lastFullLsn,
long lastDeltaLsn,
LogEntryType logEntryType,
IN parent)
Used to write a pre-serialized log entry.
|
INLogEntry(T in)
Construct an INLogEntry for writing to the log.
|
| Modifier and Type | Method and Description |
|---|---|
LogEntry |
clone() |
static <T extends IN> |
create(Class<T> INClass)
Construct a log entry for reading.
|
StringBuilder |
dumpEntry(StringBuilder sb,
boolean verbose)
Print out the contents of an entry.
|
void |
dumpRep(StringBuilder sb)
Never replicated.
|
BIN |
getBINWithExpiration()
Returns the main item BIN if it has any slots with expiration times.
|
DatabaseId |
getDbId() |
IN |
getIN(DatabaseImpl dbImpl)
Currently used by recovery only.
|
Class<T> |
getLogClass()
Returns the class of the contained loggable item or items, or null if
the instance was created to write an entry.
|
LogEntryType |
getLogType() |
T |
getMainItem() |
long |
getNodeId() |
long |
getPrevDeltaLsn() |
long |
getPrevFullLsn() |
Object |
getResolvedItem(DatabaseImpl dbImpl)
By default, this log entry is complete and does not require fetching
additional entries.
|
int |
getSize() |
long |
getTransactionId() |
boolean |
isBINDelta() |
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 |
isPreSerialized() |
boolean |
logicalEquals(LogEntry other)
INs from two different environments are never considered equal,
because they have lsns that are environment-specific.
|
void |
postFetchInit(DatabaseImpl dbImpl) |
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 BaseEntry instance of its corresponding LogEntryType.
|
String |
toString() |
void |
writeEntry(ByteBuffer destBuffer)
Serialize this object into the buffer.
|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclone, getLogType, getResolvedItem, isDeleted, isImmediatelyObsolete, postLogWork, setLogTypepublic INLogEntry(T in)
public INLogEntry(ByteBuffer bytes, long lastFullLsn, long lastDeltaLsn, LogEntryType logEntryType, IN parent)
public static <T extends IN> INLogEntry<T> create(Class<T> INClass)
public boolean isBINDelta()
isBINDelta in interface INContainingEntrypublic DatabaseId getDbId()
getDbId in interface INContainingEntrygetDbId in interface LogEntrypublic long getPrevFullLsn()
getPrevFullLsn in interface INContainingEntrypublic long getPrevDeltaLsn()
getPrevDeltaLsn in interface INContainingEntrypublic T getMainItem()
getMainItem in interface LogEntrypublic IN getIN(DatabaseImpl dbImpl)
INContainingEntrygetIN in interface INContainingEntrypublic long getNodeId()
public boolean isPreSerialized()
public BIN getBINWithExpiration()
public void readEntry(EnvironmentImpl envImpl, LogEntryHeader header, ByteBuffer entryBuffer)
LogEntrypublic int getSize()
public void writeEntry(ByteBuffer destBuffer)
LogEntrywriteEntry in interface LogEntrydestBuffer - is the destination bufferpublic long getTransactionId()
getTransactionId in interface LogEntrypublic boolean logicalEquals(LogEntry other)
logicalEquals in interface LogEntrypublic StringBuilder dumpEntry(StringBuilder sb, boolean verbose)
LogEntrypublic void dumpRep(StringBuilder sb)
public Class<T> getLogClass()
public void setLogType(LogEntryType entryType)
setLogType in interface LogEntrypublic LogEntryType getLogType()
getLogType in interface LogEntrypublic Object getResolvedItem(DatabaseImpl dbImpl)
getResolvedItem in interface LogEntrypublic boolean isImmediatelyObsolete(DatabaseImpl dbImpl)
LogEntryisImmediatelyObsolete in interface LogEntrypublic boolean isDeleted()
LogEntrypublic void postLogWork(LogEntryHeader header, long justLoggedLsn, VLSN vlsn)
postLogWork in interface LogEntryDatabaseException - from subclasses.public void postFetchInit(DatabaseImpl dbImpl)
public LogEntry clone()
Copyright © 2024. All rights reserved.