public class NameLNLogEntry extends LNLogEntry<NameLN>
MIN_LOG_SIZE| Constructor and Description |
|---|
NameLNLogEntry()
Constructor to read an entry.
|
NameLNLogEntry(LogEntryType entryType,
DatabaseId dbId,
Txn txn,
long abortLsn,
boolean abortKD,
byte[] key,
NameLN nameLN,
int priorSize,
long priorLsn,
ReplicationContext repContext)
Constructor to write this entry.
|
| Modifier and Type | Method and Description |
|---|---|
LogEntry |
clone() |
StringBuilder |
dumpEntry(StringBuilder sb,
boolean verbose)
Extends its super class to dump database operation information.
|
void |
dumpRep(StringBuilder sb)
Dump the contents of the log entry that are interesting for
replication.
|
Collection<VersionedWriteLoggable> |
getEmbeddedLoggables()
Returns all possible
VersionedWriteLoggable objects that may be
embedded in the binary data of this log entry. |
int |
getLastFormatChange()
Returns the log version of the most recent format change for this log
entry.
|
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() |
DbOperationType |
getOperationType() |
ReplicatedDatabaseConfig |
getReplicatedCreateConfig() |
Object |
getResolvedItem(DatabaseImpl dbImpl)
By default, this log entry is complete and does not require fetching
additional entries.
|
int |
getSize() |
int |
getSize(int logVersion,
boolean forReplication)
Returns the number of bytes needed to store this entry in the format for
the specified log version.
|
DatabaseId |
getTruncateOldDbId() |
boolean |
logicalEquals(LogEntry other) |
void |
readEntry(EnvironmentImpl envImpl,
LogEntryHeader header,
ByteBuffer entryBuffer)
Extends its super class to read in database operation information.
|
void |
setLogType(LogEntryType entryType)
Inform a BaseEntry instance of its corresponding LogEntryType.
|
String |
toString() |
void |
writeEntry(ByteBuffer destBuffer)
Serialize this object into the buffer.
|
void |
writeEntry(ByteBuffer destBuffer,
int logVersion,
boolean forReplication)
Serializes this object into the specified buffer in the format for the
the specified log version.
|
countPriorVersionObsolete, create, getAbortData, getAbortExpiration, getAbortKey, getAbortKnownDeleted, getAbortLsn, getAbortVLSN, getData, getDbId, getEmbeddedData, getExpiration, getKey, getLN, getMainItem, getPriorVersionLsn, getPriorVersionSize, getTransactionId, getTxnId, getUnconvertedDataLength, getUnconvertedKeyLength, getUserKeyData, getUserTxn, hasReplicationFormat, isAbortExpirationInHours, isDeleted, isEmbeddedLN, isExpirationInHours, isImmediatelyObsolete, isReplicationFormatWorthwhile, postFetchInit, postFetchInit, postLogWorkequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitclone, getLogType, getResolvedItem, setLogTypepublic NameLNLogEntry()
public NameLNLogEntry(LogEntryType entryType, DatabaseId dbId, Txn txn, long abortLsn, boolean abortKD, byte[] key, NameLN nameLN, int priorSize, long priorLsn, ReplicationContext repContext)
public void readEntry(EnvironmentImpl envImpl, LogEntryHeader header, ByteBuffer entryBuffer)
readEntry in interface LogEntryreadEntry in class LNLogEntry<NameLN>public StringBuilder dumpEntry(StringBuilder sb, boolean verbose)
dumpEntry in interface LogEntrydumpEntry in class LNLogEntry<NameLN>public int getLastFormatChange()
ReplicableLogEntrygetLastFormatChange in interface ReplicableLogEntrygetLastFormatChange in class LNLogEntry<NameLN>public Collection<VersionedWriteLoggable> getEmbeddedLoggables()
ReplicableLogEntryVersionedWriteLoggable objects that may be
embedded in the binary data of this log entry.
This is used by tests to ensure that for each X:Y pair, where X is a ReplicableLogEntry and Y is a VersionedWriteLoggable, and X embeds Y either directly or indirectly, X.getLastFormatChange is greater than or equal to Y.getLastFormatChange.
Each ReplicableLogEntry and VersionedWriteLoggable class typically has a LAST_FORMAT_CHANGE constant that is returned by its getLastFormatChange method. When bumping this constant for an object X embedded by an log entry Y, Y.LAST_FORMAT_CHANGE should also be set to the minimum of its current value and X.LAST_FORMAT_CHANGE.
Enforcing this rule in a general way is made possible by the getEmbeddedLoggables method of each ReplicableLogEntry and VersionedWriteLoggable. Note that this method is not intended to be called outside of tests.
getEmbeddedLoggables in interface ReplicableLogEntrygetEmbeddedLoggables in class LNLogEntry<NameLN>public int getSize(int logVersion,
boolean forReplication)
ReplicableLogEntryLogEntryType.LOG_VERSION_REPLICATE_OLDER or greater.getSize in interface ReplicableLogEntrygetSize in class LNLogEntry<NameLN>logVersion - the log versionforReplication - whether the entry will be sent over the wire,
and not written to the log.public void writeEntry(ByteBuffer destBuffer, int logVersion, boolean forReplication)
ReplicableLogEntryLogEntryType.LOG_VERSION_REPLICATE_OLDER or greater.writeEntry in interface ReplicableLogEntrywriteEntry in class LNLogEntry<NameLN>destBuffer - the destination bufferlogVersion - the log versionforReplication - whether the entry will be sent over the wire,
and not written to the log.public boolean logicalEquals(LogEntry other)
logicalEquals in interface LogEntrylogicalEquals in class LNLogEntry<NameLN>public DbOperationType getOperationType()
public ReplicatedDatabaseConfig getReplicatedCreateConfig()
public DatabaseId getTruncateOldDbId()
public void dumpRep(StringBuilder sb)
LogEntrydumpRep in interface LogEntrydumpRep in class LNLogEntry<NameLN>public void writeEntry(ByteBuffer destBuffer)
LogEntrywriteEntry in interface LogEntrydestBuffer - is the destination bufferpublic int getSize()
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 LogEntry clone()
Copyright © 2024. All rights reserved.