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
           
(package private)  Class logClass
           
 
Constructor Summary
BaseEntry()
          Constructor to write an entry.
BaseEntry(Class logClass)
          Constructor to read an entry.
 
Method Summary
 boolean countAsObsoleteWhenLogged()
          Returns true if this item should be counted as obsoleted when logged.
 LogEntryType getLogType()
           
 void postLogWork(long justLoggedLsn)
          Do any processing we need to do after logging, while under the logging latch.
 void setLastLoggedSize(int size)
          By default, do nothing.
 void setLogType(LogEntryType entryType)
          Inform a BaseEntry instance of its corresponding LogEntryType.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logClass

Class logClass

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

setLogType

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


getLogType

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

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

setLastLoggedSize

public void setLastLoggedSize(int size)
By default, do nothing. This is overridden by some entries (LNs) to save the last logged size



Copyright 2004,2008 Oracle. All rights reserved.