T - the type of the Loggable itempublic class SingleItemEntry<T extends Loggable> extends Object implements LogEntry
the Loggable item
| Constructor and Description |
|---|
SingleItemEntry(LogEntryType entryType,
T item)
Construct a log entry for writing.
|
| Modifier and Type | Method and Description |
|---|---|
LogEntry |
clone() |
static <T extends Loggable> |
create(Class<T> logClass)
Construct a log entry for reading.
|
static <T extends Loggable> |
create(LogEntryType entryType,
T item)
Construct a log entry for writing.
|
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() |
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() |
Object |
getResolvedItem(DatabaseImpl dbImpl)
By default, this log entry is complete and does not require fetching
additional entries.
|
int |
getSize() |
long |
getTransactionId() |
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 |
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 SingleItemEntry(LogEntryType entryType, T item)
public static <T extends Loggable> SingleItemEntry<T> create(Class<T> logClass)
public static <T extends Loggable> SingleItemEntry<T> create(LogEntryType entryType, T item)
public void readEntry(EnvironmentImpl envImpl, LogEntryHeader header, ByteBuffer entryBuffer)
LogEntrypublic StringBuilder dumpEntry(StringBuilder sb, boolean verbose)
LogEntrypublic void dumpRep(StringBuilder sb)
LogEntrypublic T getMainItem()
getMainItem in interface LogEntrypublic long getTransactionId()
getTransactionId in interface LogEntrypublic DatabaseId getDbId()
public int getSize()
public void writeEntry(ByteBuffer destBuffer)
LogEntrywriteEntry in interface LogEntrydestBuffer - is the destination bufferpublic boolean logicalEquals(LogEntry other)
logicalEquals in interface LogEntrypublic 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.