public abstract class ScavengerFileReader extends FileReader
FileReader.EOFException, FileReader.ReadWindow
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window
Constructor and Description |
---|
ScavengerFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
long finishLsn,
long endOfFileLsn)
Create this reader to start at a given LSN.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
isTargetEntry() |
protected boolean |
processEntry(java.nio.ByteBuffer entryBuffer)
Each file reader implements this method to process the entry data.
|
protected abstract void |
processEntryCallback(LogEntry entry,
LogEntryType entryType) |
boolean |
readNextEntry()
Scans the log files until either it has reached the end of the log or
has hit an invalid portion.
|
protected boolean |
resyncReader(long nextGoodRecordPostCorruption,
boolean showCorruptedBounds) |
void |
setDumpCorruptedBounds(boolean dumpCorruptedBounds)
Set to true if corrupted boundaries should be dumped to stderr.
|
void |
setTargetType(LogEntryType type)
Tell the reader that we are interested in these kind of entries.
|
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntryAllowExceptions, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, skipData, skipEntry, threadSafeBufferFlip, threadSafeBufferPosition, threadSafeBufferPosition
public ScavengerFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, long finishLsn, long endOfFileLsn) throws DatabaseException
DatabaseException
public void setDumpCorruptedBounds(boolean dumpCorruptedBounds)
public void setTargetType(LogEntryType type)
protected boolean processEntry(java.nio.ByteBuffer entryBuffer) throws DatabaseException
FileReader
processEntry
in class FileReader
entryBuffer
- contains the entry data and is positioned at the
dataDatabaseException
protected abstract void processEntryCallback(LogEntry entry, LogEntryType entryType) throws DatabaseException
DatabaseException
public boolean readNextEntry()
FileReader
readNextEntry
in class FileReader
protected boolean resyncReader(long nextGoodRecordPostCorruption, boolean showCorruptedBounds) throws DatabaseException
resyncReader
in class FileReader
DatabaseException
protected boolean isTargetEntry()
isTargetEntry
in class FileReader
Copyright (c) 2004-2012 Oracle. All rights reserved.