com.sleepycat.je.log.entry
Class BaseEntry

java.lang.Object
  extended by com.sleepycat.je.log.entry.BaseEntry
Direct Known Subclasses:
INLogEntry, LNLogEntry, SingleItemEntry

abstract class BaseEntry
extends Object

A Log entry allows you to read, write and dump a database log entry. Each entry may be made up of one or more loggable items. The log entry on disk consists of a. a log header defined by LogManager b. a VLSN, if this entry type requires it, and replication is on. c. the specific contents of the log entry. This class encompasses (b & c).


Field Summary
(package private)  LogEntryType entryType
           
 
Constructor Summary
BaseEntry()
          Constructor to write an entry.
BaseEntry(Class<?> logClass)
          Constructor to read an entry.
 
Method Summary
abstract  StringBuilder dumpEntry(StringBuilder sb, boolean verbose)
           
 int getLastLoggedSize()
          By default, return zero because the last logged size is unknown.
 LogEntryType getLogType()
           
 boolean isDeleted()
          Returns true if this item should be counted as obsoleted when logged.
(package private)  Object newInstanceOfType()
           
 void postLogWork(long justLoggedLsn)
          Do any processing we need to do after logging, while under the logging latch.
 void setLogType(LogEntryType entryType)
          Inform a BaseEntry instance of its corresponding LogEntryType.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

entryType

LogEntryType entryType
Constructor Detail

BaseEntry

BaseEntry(Class<?> logClass)
Constructor to read an entry. The logEntryType must be set later, through setLogType().


BaseEntry

BaseEntry()
Constructor to write an entry.

Method Detail

newInstanceOfType

Object newInstanceOfType()
Returns:
a new instance of the class used to create the log entry.

setLogType

public void setLogType(LogEntryType entryType)
Inform a BaseEntry instance of its corresponding LogEntryType.


getLogType

public LogEntryType getLogType()
Returns:
the type of log entry

getLastLoggedSize

public int getLastLoggedSize()
By default, return zero because the last logged size is unknown. This method is overridden by LNLogEntry.


isDeleted

public boolean isDeleted()
Returns true if this item should be counted as obsoleted when logged. This currently applies to deleted LNs only.


postLogWork

public void postLogWork(long justLoggedLsn)
                 throws DatabaseException
Do any processing we need to do after logging, while under the logging latch.

Throws:
DatabaseException - from subclasses.

dumpEntry

public abstract StringBuilder dumpEntry(StringBuilder sb,
                                        boolean verbose)

toString

public String toString()
Overrides:
toString in class Object


Copyright (c) 2004-2010 Oracle. All rights reserved.