public abstract class ScavengerFileReader extends FileReader
anticipateChecksumErrors, cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, nextEntryOffset, readBufferFileEnd, readBufferFileNum, readBufferFileStart, startLsn
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(byte logEntryTypeNumber,
byte logEntryTypeVersion) |
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()
readNextEntry scans the log files until either it's 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.
|
getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, setAlwaysValidateChecksum
public ScavengerFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, long finishLsn, long endOfFileLsn) throws java.io.IOException, DatabaseException
java.io.IOException
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
DatabaseException
protected abstract void processEntryCallback(LogEntry entry, LogEntryType entryType) throws DatabaseException
DatabaseException
public boolean readNextEntry() throws DatabaseException, java.io.IOException
FileReader
readNextEntry
in class FileReader
DatabaseException
java.io.IOException
protected boolean resyncReader(long nextGoodRecordPostCorruption, boolean showCorruptedBounds) throws DatabaseException, java.io.IOException
resyncReader
in class FileReader
DatabaseException
java.io.IOException
protected boolean isTargetEntry(byte logEntryTypeNumber, byte logEntryTypeVersion)
isTargetEntry
in class FileReader