public class LogEntryType
extends java.lang.Object
Log entries are versioned. When changing the persistent form of a log entry in any way that is incompatible with prior releases, make sure the LogEntry instance is capable of reading in older versions from the log and be sure to increment LOG_VERSION. The LogEntry.readEntry and Loggable.readFromLog methods should check the actual version of the entry. If it is less than LOG_VERSION, the old version should be converted to the current version.
Prior to LOG_VERSION 6, each log entry type had a separate version number that was incremented only when that log version changed. From LOG_VERSION 6 onward, all types use the same version, the LOG_VERSION constant. For versions prior to 6, the readEntry and readFromLog methods will be checking the old per-type version. There is no overlap between the old per-type versions and the LOG_VERSION values, because the per-type values are all below 6. [#15365]
The LogEntry instance must be sure that older versions are converted in memory into a correct instance of the newest version, so when that LogEntry object is written again as the result of migration, eviction, the resulting new log entry conforms to the requirements of the new version. If context objects are required for data conversion, the conversion can be done in the Node.postFetchInit method.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
LogEntryType.Marshall |
(package private) static class |
LogEntryType.NodeType |
(package private) static class |
LogEntryType.Replicable |
(package private) static class |
LogEntryType.Txnal |
Constructor and Description |
---|
LogEntryType(byte typeNum)
For base class support.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
compareTypeAndVersion(int versionA,
byte typeA,
int versionB,
byte typeB)
Return true if the two types are equal.
|
boolean |
compareTypeAndVersion(int verionA,
int versionB,
byte typeB)
Return true if the type of this LogEntryType is equivalent to typeB.
|
boolean |
equals(java.lang.Object obj) |
boolean |
equalsType(byte type)
Check for equality without making a new object.
|
static LogEntryType |
findType(byte typeNum) |
static java.util.Set<LogEntryType> |
getAllTypes()
Get a copy of all types for unit testing.
|
LogEntry |
getNewLogEntry() |
LogEntry |
getSharedLogEntry() |
byte |
getTypeNum() |
int |
hashCode()
This is used as a hash key.
|
boolean |
isINType() |
boolean |
isLNType() |
boolean |
isNodeType() |
boolean |
isOldDupType() |
boolean |
isReplicationPossible()
Return true if this type of log entry can be part of the replication
stream.
|
boolean |
isSyncPoint()
Return true if this type of log entry can serve as the synchronization
matchpoint for the replication stream.
|
static boolean |
isSyncPoint(byte entryType)
Return true if this type of log entry can serve as the synchronization
matchpoint for the replication stream.
|
boolean |
isTransactional()
Return true if this log entry has transactional information in it,
like a commit or abort record, or a transactional LN.
|
boolean |
isUserLNType() |
(package private) static boolean |
isValidType(byte typeNum) |
boolean |
marshallOutsideLatch()
Return true if this log entry should be marshalled into a buffer outside
the log write latch.
|
java.lang.String |
toString() |
java.lang.String |
toStringNoVersion() |
public static final int LOG_VERSION
public static final int FIRST_LOG_VERSION
public static final int UNKNOWN_FILE_HEADER_VERSION
public static final LogEntryType LOG_OLD_LN_TRANSACTIONAL
public static final LogEntryType LOG_OLD_LN
public static final LogEntryType LOG_MAPLN_TRANSACTIONAL
public static final LogEntryType LOG_MAPLN
public static final LogEntryType LOG_NAMELN_TRANSACTIONAL
public static final LogEntryType LOG_NAMELN
public static final LogEntryType LOG_DEL_DUPLN_TRANSACTIONAL
public static final LogEntryType LOG_DEL_DUPLN
public static final LogEntryType LOG_DUPCOUNTLN_TRANSACTIONAL
public static final LogEntryType LOG_DUPCOUNTLN
public static final LogEntryType LOG_FILESUMMARYLN
public static final LogEntryType LOG_IN
public static final LogEntryType LOG_BIN
public static final LogEntryType LOG_DIN
public static final LogEntryType LOG_DBIN
public static final LogEntryType LOG_DBTREE
public static final LogEntryType LOG_TXN_COMMIT
public static final LogEntryType LOG_TXN_ABORT
public static final LogEntryType LOG_CKPT_START
public static final LogEntryType LOG_CKPT_END
public static final LogEntryType LOG_IN_DELETE_INFO
public static final LogEntryType LOG_BIN_DELTA
public static final LogEntryType LOG_DUP_BIN_DELTA
public static final LogEntryType LOG_TRACE
public static final LogEntryType LOG_FILE_HEADER
public static final LogEntryType LOG_IN_DUPDELETE_INFO
public static final LogEntryType LOG_TXN_PREPARE
public static final LogEntryType LOG_ROLLBACK_START
public static final LogEntryType LOG_ROLLBACK_END
public static final LogEntryType LOG_MATCHPOINT
public static final LogEntryType LOG_DEL_LN_TRANSACTIONAL
public static final LogEntryType LOG_DEL_LN
public static final LogEntryType LOG_INS_LN_TRANSACTIONAL
public static final LogEntryType LOG_INS_LN
public static final LogEntryType LOG_UPD_LN_TRANSACTIONAL
public static final LogEntryType LOG_UPD_LN
public static LogEntryType findType(byte typeNum)
public static java.util.Set<LogEntryType> getAllTypes()
public LogEntry getSharedLogEntry()
public LogEntry getNewLogEntry() throws DatabaseException
DatabaseException
public byte getTypeNum()
static boolean isValidType(byte typeNum)
public java.lang.String toStringNoVersion()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean equalsType(byte type)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean isTransactional()
public boolean marshallOutsideLatch()
public boolean compareTypeAndVersion(int verionA, int versionB, byte typeB)
public boolean isReplicationPossible()
public boolean isSyncPoint()
public static boolean isSyncPoint(byte entryType)
public boolean isNodeType()
public boolean isUserLNType()
public boolean isLNType()
public boolean isINType()
public boolean isOldDupType()
public static boolean compareTypeAndVersion(int versionA, byte typeA, int versionB, byte typeB)
Copyright (c) 2004-2012 Oracle. All rights reserved.