org.exist.storage.journal
Class LogEntryTypes

java.lang.Object
  extended by org.exist.storage.journal.LogEntryTypes

public class LogEntryTypes
extends java.lang.Object

Registry for log entry types. All classes that can be read from or written to the journal have to be registered here. The recovery manager uses this information to create the correct Loggable object when reading the log.

Author:
wolf

Field Summary
static byte CHECKPOINT
           
static byte TXN_ABORT
           
static byte TXN_COMMIT
           
static byte TXN_START
           
 
Constructor Summary
LogEntryTypes()
           
 
Method Summary
static void addEntryType(byte type, java.lang.Class clazz)
          Add an entry type to the registry.
static Loggable create(byte type, DBBroker broker, long transactId)
          Create a new loggable object for the given type.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TXN_START

public static final byte TXN_START
See Also:
Constant Field Values

TXN_COMMIT

public static final byte TXN_COMMIT
See Also:
Constant Field Values

CHECKPOINT

public static final byte CHECKPOINT
See Also:
Constant Field Values

TXN_ABORT

public static final byte TXN_ABORT
See Also:
Constant Field Values
Constructor Detail

LogEntryTypes

public LogEntryTypes()
Method Detail

addEntryType

public static final void addEntryType(byte type,
                                      java.lang.Class clazz)
Add an entry type to the registry.

Parameters:
type -
clazz - the class implementing Loggable.

create

public static final Loggable create(byte type,
                                    DBBroker broker,
                                    long transactId)
                             throws LogException
Create a new loggable object for the given type.

Parameters:
type -
transactId - the id of the current transaction.
Returns:
Throws:
LogException


Copyright (C) Wolfgang Meier. All rights reserved.