com.sleepycat.je.log
Class LogEntryType

java.lang.Object
  extended by com.sleepycat.je.log.LogEntryType

public class LogEntryType
extends Object

LogEntryType is a type safe enumeration of all log entry types.

When adding a new version of a log entry, make sure the owning Loggable object is capable of reading in older versions from the log. The Loggable object must be sure that older versions are converted in memory into a correct instance of the newest version, so when that Loggable 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.


Field Summary
static LogEntryType[] IN_TYPES
           
static LogEntryType LOG_BIN
           
static LogEntryType LOG_BIN_DELTA
           
static LogEntryType LOG_CKPT_END
           
static LogEntryType LOG_CKPT_START
           
static LogEntryType LOG_DBIN
           
static LogEntryType LOG_DEL_DUPLN
           
static LogEntryType LOG_DEL_DUPLN_TRANSACTIONAL
           
static LogEntryType LOG_DIN
           
static LogEntryType LOG_DUP_BIN_DELTA
           
static LogEntryType LOG_DUPCOUNTLN
           
static LogEntryType LOG_DUPCOUNTLN_TRANSACTIONAL
           
static LogEntryType LOG_FILE_HEADER
           
static LogEntryType LOG_FILESUMMARYLN
           
static LogEntryType LOG_IN
           
static LogEntryType LOG_IN_DELETE_INFO
           
static LogEntryType LOG_IN_DUPDELETE_INFO
           
static LogEntryType LOG_LN
           
static LogEntryType LOG_LN_TRANSACTIONAL
           
static LogEntryType LOG_MAPLN
           
static LogEntryType LOG_MAPLN_TRANSACTIONAL
           
static LogEntryType LOG_NAMELN
           
static LogEntryType LOG_NAMELN_TRANSACTIONAL
           
static LogEntryType LOG_ROOT
           
static LogEntryType LOG_TRACE
           
static LogEntryType LOG_TXN_ABORT
           
static LogEntryType LOG_TXN_COMMIT
           
static LogEntryType LOG_TXN_PREPARE
           
 
Constructor Summary
LogEntryType(byte typeNum, byte version)
          For base class support.
 
Method Summary
static byte clearProvisional(byte version)
          Clear the provisional bit.
 boolean equals(Object obj)
           
(package private)  boolean equalsType(byte typeNum)
           
(package private)  boolean equalsType(byte typeNum, byte version)
          Check for equality without making a new object.
(package private) static LogEntryType findType(byte typeNum, byte version)
           
static Set getAllTypes()
          Get a copy of all types for unit testing.
(package private)  LogEntry getNewLogEntry()
           
(package private)  LogEntry getSharedLogEntry()
           
(package private)  byte getTypeNum()
           
(package private)  byte getVersion()
           
 int hashCode()
          This is used as a hash key.
 boolean isNodeType()
           
static boolean isNodeType(byte typeNum, byte version)
           
(package private) static boolean isProvisional(byte version)
           
(package private) static boolean isValidType(byte typeNum)
           
(package private) static byte setProvisional(byte version)
          Set the provisional bit.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOG_LN_TRANSACTIONAL

public static final LogEntryType LOG_LN_TRANSACTIONAL

LOG_LN

public static final LogEntryType LOG_LN

LOG_MAPLN_TRANSACTIONAL

public static final LogEntryType LOG_MAPLN_TRANSACTIONAL

LOG_MAPLN

public static final LogEntryType LOG_MAPLN

LOG_NAMELN_TRANSACTIONAL

public static final LogEntryType LOG_NAMELN_TRANSACTIONAL

LOG_NAMELN

public static final LogEntryType LOG_NAMELN

LOG_DEL_DUPLN_TRANSACTIONAL

public static final LogEntryType LOG_DEL_DUPLN_TRANSACTIONAL

LOG_DEL_DUPLN

public static final LogEntryType LOG_DEL_DUPLN

LOG_DUPCOUNTLN_TRANSACTIONAL

public static final LogEntryType LOG_DUPCOUNTLN_TRANSACTIONAL

LOG_DUPCOUNTLN

public static final LogEntryType LOG_DUPCOUNTLN

LOG_FILESUMMARYLN

public static final LogEntryType LOG_FILESUMMARYLN

LOG_IN

public static final LogEntryType LOG_IN

LOG_BIN

public static final LogEntryType LOG_BIN

LOG_DIN

public static final LogEntryType LOG_DIN

LOG_DBIN

public static final LogEntryType LOG_DBIN

IN_TYPES

public static final LogEntryType[] IN_TYPES

LOG_ROOT

public static final LogEntryType LOG_ROOT

LOG_TXN_COMMIT

public static final LogEntryType LOG_TXN_COMMIT

LOG_TXN_ABORT

public static final LogEntryType LOG_TXN_ABORT

LOG_CKPT_START

public static final LogEntryType LOG_CKPT_START

LOG_CKPT_END

public static final LogEntryType LOG_CKPT_END

LOG_IN_DELETE_INFO

public static final LogEntryType LOG_IN_DELETE_INFO

LOG_BIN_DELTA

public static final LogEntryType LOG_BIN_DELTA

LOG_DUP_BIN_DELTA

public static final LogEntryType LOG_DUP_BIN_DELTA

LOG_TRACE

public static final LogEntryType LOG_TRACE

LOG_FILE_HEADER

public static final LogEntryType LOG_FILE_HEADER

LOG_IN_DUPDELETE_INFO

public static final LogEntryType LOG_IN_DUPDELETE_INFO

LOG_TXN_PREPARE

public static final LogEntryType LOG_TXN_PREPARE
Constructor Detail

LogEntryType

LogEntryType(byte typeNum,
             byte version)
For base class support.

Method Detail

isNodeType

public static boolean isNodeType(byte typeNum,
                                 byte version)

isNodeType

public boolean isNodeType()

findType

static LogEntryType findType(byte typeNum,
                             byte version)
Returns:
the static version of this type

getAllTypes

public static Set getAllTypes()
Get a copy of all types for unit testing.


getSharedLogEntry

LogEntry getSharedLogEntry()
Returns:
the log entry type owned by the shared, static version

getNewLogEntry

LogEntry getNewLogEntry()
                  throws DatabaseException
Returns:
a clone of the log entry type for a given log type.
Throws:
DatabaseException

setProvisional

static byte setProvisional(byte version)
Set the provisional bit.


clearProvisional

public static byte clearProvisional(byte version)
Clear the provisional bit.


isProvisional

static boolean isProvisional(byte version)
Returns:
true if the provisional bit is set.

getTypeNum

byte getTypeNum()

getVersion

byte getVersion()

isValidType

static boolean isValidType(byte typeNum)
Returns:
true if type number is valid.

toString

public String toString()
Overrides:
toString in class Object

equalsType

boolean equalsType(byte typeNum,
                   byte version)
Check for equality without making a new object.


equalsType

boolean equalsType(byte typeNum)

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
This is used as a hash key.

Overrides:
hashCode in class Object


Copyright 2004-2005 Sleepycat, Inc. All Rights Reserved.