public abstract class ScavengerFileReader extends FileReader
FileReader.EOFException, FileReader.ReadWindowcksumValidator, 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 void |
handleGapInBackwardsScan(long prevFileNum)
TBW
|
protected boolean |
isTargetEntry()
This method is called by readNextEntry() after the header of the current
logrec has been de-serialized, but not the body.
|
protected boolean |
processEntry(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, getLastVlsn, getLogVersion, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntryAllowExceptions, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, skipData, skipEntrypublic ScavengerFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, long finishLsn, long endOfFileLsn) throws DatabaseException
DatabaseExceptionpublic void setDumpCorruptedBounds(boolean dumpCorruptedBounds)
public void setTargetType(LogEntryType type)
protected boolean processEntry(ByteBuffer entryBuffer) throws DatabaseException
FileReaderprocessEntry in class FileReaderentryBuffer - A ByteBuffer that the logrec data and is positioned
at the start of the logrec body (i.e., just after the logrec header).DatabaseExceptionprotected abstract void processEntryCallback(LogEntry entry, LogEntryType entryType) throws DatabaseException
DatabaseExceptionpublic boolean readNextEntry()
FileReaderreadNextEntry in class FileReaderprotected void handleGapInBackwardsScan(long prevFileNum)
handleGapInBackwardsScan in class FileReaderprotected boolean resyncReader(long nextGoodRecordPostCorruption,
boolean showCorruptedBounds)
throws DatabaseException
DatabaseExceptionprotected boolean isTargetEntry()
FileReaderisTargetEntry in class FileReaderCopyright © 2024. All rights reserved.