com.sleepycat.je.log
Class CheckpointFileReader

java.lang.Object
  extended by com.sleepycat.je.log.FileReader
      extended by com.sleepycat.je.log.CheckpointFileReader

public class CheckpointFileReader
extends FileReader

CheckpointFileReader searches for root and checkpoint entries.


Field Summary
 
Fields inherited from class com.sleepycat.je.log.FileReader
anticipateChecksumErrors, cksumValidator, currentEntryChecksum, currentEntryOffset, currentEntryPrevOffset, currentEntrySize, currentEntryTypeNum, currentEntryTypeVersion, env, eof, fileManager, nextEntryOffset, readBufferFileEnd, readBufferFileNum, readBufferFileStart, startLsn
 
Constructor Summary
CheckpointFileReader(EnvironmentImpl env, int readBufferSize, boolean forward, long startLsn, long finishLsn, long endOfFileLsn)
          Create this reader to start at a given LSN.
 
Method Summary
 boolean isCheckpointEnd()
           
 boolean isCheckpointStart()
           
 boolean isRoot()
           
protected  boolean isTargetEntry(byte logEntryTypeNumber, byte logEntryTypeVersion)
           
protected  boolean processEntry(ByteBuffer entryBuffer)
          This reader instantiate the first object of a given log entry
 
Methods inherited from class com.sleepycat.je.log.FileReader
getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, readNextEntry, resyncReader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CheckpointFileReader

public CheckpointFileReader(EnvironmentImpl env,
                            int readBufferSize,
                            boolean forward,
                            long startLsn,
                            long finishLsn,
                            long endOfFileLsn)
                     throws IOException,
                            DatabaseException
Create this reader to start at a given LSN.

Throws:
IOException
DatabaseException
Method Detail

isTargetEntry

protected boolean isTargetEntry(byte logEntryTypeNumber,
                                byte logEntryTypeVersion)
Overrides:
isTargetEntry in class FileReader
Returns:
true if this is a targetted entry.

processEntry

protected boolean processEntry(ByteBuffer entryBuffer)
                        throws DatabaseException
This reader instantiate the first object of a given log entry

Specified by:
processEntry in class FileReader
Returns:
true if this entry should be returned
Throws:
DatabaseException

isRoot

public boolean isRoot()
Returns:
true if last entry was a root entry.

isCheckpointEnd

public boolean isCheckpointEnd()
Returns:
true if last entry was a checkpoint end entry.

isCheckpointStart

public boolean isCheckpointStart()
Returns:
true if last entry was a checkpoint start entry.


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