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() |
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, threadSafeBufferPosition, threadSafeBufferPositionpublic ScavengerFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, long finishLsn, long endOfFileLsn) throws java.io.IOException, DatabaseException
java.io.IOExceptionDatabaseExceptionpublic void setDumpCorruptedBounds(boolean dumpCorruptedBounds)
public void setTargetType(LogEntryType type)
protected boolean processEntry(java.nio.ByteBuffer entryBuffer)
throws DatabaseException
FileReaderprocessEntry in class FileReaderDatabaseExceptionprotected abstract void processEntryCallback(LogEntry entry, LogEntryType entryType) throws DatabaseException
DatabaseExceptionpublic boolean readNextEntry()
throws DatabaseException,
java.io.IOException
FileReaderreadNextEntry in class FileReaderDatabaseExceptionjava.io.IOExceptionprotected boolean resyncReader(long nextGoodRecordPostCorruption,
boolean showCorruptedBounds)
throws DatabaseException,
java.io.IOException
resyncReader in class FileReaderDatabaseExceptionjava.io.IOExceptionprotected boolean isTargetEntry()
isTargetEntry in class FileReaderCopyright (c) 2004,2008 Oracle. All rights reserved.