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.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sleepycat.je.log.FileReader
FileReader.EOFException, FileReader.ReadWindow
 
Field Summary
 
Fields inherited from class com.sleepycat.je.log.FileReader
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window
 
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 isDbTree()
           
protected  boolean isTargetEntry()
           
protected  boolean processEntry(ByteBuffer entryBuffer)
          This reader instantiates the first object of a given log entry
 
Methods inherited from class com.sleepycat.je.log.FileReader
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntry, readNextEntryAllowExceptions, resyncReader, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, skipData, skipEntry, threadSafeBufferFlip, threadSafeBufferPosition, threadSafeBufferPosition
 
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 DatabaseException
Create this reader to start at a given LSN.

Throws:
DatabaseException
Method Detail

isTargetEntry

protected boolean isTargetEntry()
Overrides:
isTargetEntry in class FileReader
Returns:
true if this is a targeted entry.

processEntry

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

Specified by:
processEntry in class FileReader
Parameters:
entryBuffer - contains the entry data and is positioned at the data
Returns:
true if this entry should be returned

isDbTree

public boolean isDbTree()
Returns:
true if last entry was a DbTree 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 (c) 2004-2012 Oracle. All rights reserved.