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 java.lang.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
           
(package private)  java.lang.Class<?> logClass
           
 
Constructor Summary
BaseEntry()
          Constructor to write an entry.
BaseEntry(java.lang.Class<?> logClass)
          Constructor to read an entry.
 
Method Summary
 boolean countAsObsoleteWhenLogged()
          Returns true if this item should be counted as obsoleted when logged.
abstract  java.lang.StringBuffer dumpEntry(java.lang.StringBuffer sb, boolean verbose)
           
 int getLastLoggedSize()
          By default, return zero because the last logged size is unknown.
 LogEntryType getLogType()
           
 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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logClass

java.lang.Class<?> logClass

entryType

LogEntryType entryType
Constructor Detail

BaseEntry

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


BaseEntry

BaseEntry()
Constructor to write an entry.

Method Detail

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.


countAsObsoleteWhenLogged

public boolean countAsObsoleteWhenLogged()
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

dumpEntry

public abstract java.lang.StringBuffer dumpEntry(java.lang.StringBuffer sb,
                                                 boolean verbose)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright (c) 2004,2008 Oracle. All rights reserved.