com.sleepycat.je.log
Class SearchFileReader
java.lang.Object
com.sleepycat.je.log.FileReader
com.sleepycat.je.log.SearchFileReader
public class SearchFileReader
- extends FileReader
SearchFileReader searches for the a given entry type.
Fields inherited from class com.sleepycat.je.log.FileReader |
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window |
Methods inherited from class com.sleepycat.je.log.FileReader |
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntry, readNextEntryAllowExceptions, resyncReader, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, threadSafeBufferFlip, threadSafeBufferPosition, threadSafeBufferPosition |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchFileReader
public SearchFileReader(EnvironmentImpl env,
int readBufferSize,
boolean forward,
long startLsn,
long endOfFileLsn,
LogEntryType targetType)
throws DatabaseException
- Create this reader to start at a given LSN.
- Throws:
DatabaseException
isTargetEntry
protected boolean isTargetEntry()
- Overrides:
isTargetEntry
in class FileReader
- Returns:
- true if this is a targeted 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
- Parameters:
entryBuffer
- contains the entry data and is positioned at the
data
- Returns:
- true if this entry should be returned
- Throws:
DatabaseException
getLastObject
public Object getLastObject()
- Returns:
- the last object read.
Copyright (c) 2004-2010 Oracle. All rights reserved.