public class CleanerFileReader extends FileReader
anticipateChecksumErrors, cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, nextEntryOffset, readBufferFileEnd, readBufferFileNum, readBufferFileStart, startLsn
Constructor and Description |
---|
CleanerFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
java.lang.Long fileNum)
Create this reader to start at a given LSN.
|
Modifier and Type | Method and Description |
---|---|
DatabaseId |
getDatabaseId()
Get the last databaseId seen by the reader.
|
byte[] |
getDupTreeKey()
Get the last key seen by the reader.
|
FileHeader |
getFileHeader() |
IN |
getIN()
Get the last entry seen by the reader as an IN.
|
byte[] |
getKey()
Get the last key seen by the reader.
|
LN |
getLN()
Get the last LN seen by the reader.
|
protected void |
initStartingPosition(long endOfFileLsn,
java.lang.Long fileNum)
Helper for determining the starting position and opening
up a file at the desired location.
|
boolean |
isFileHeader() |
boolean |
isIN() |
boolean |
isLN() |
boolean |
isRoot() |
protected boolean |
isTargetEntry() |
protected boolean |
processEntry(java.nio.ByteBuffer entryBuffer)
This reader instantiates an LN and key for every LN entry.
|
getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, readNextEntry, resyncReader, setAlwaysValidateChecksum
public CleanerFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, java.lang.Long fileNum) throws java.io.IOException, DatabaseException
env
- The relevant EnvironmentImpl.readBufferSize
- buffer size in bytes for reading in log.startLsn
- where to start in the log, or null for the beginning.fileNum
- single file number.java.io.IOException
DatabaseException
protected void initStartingPosition(long endOfFileLsn, java.lang.Long fileNum) throws java.io.IOException, DatabaseException
initStartingPosition
in class FileReader
java.io.IOException
DatabaseException
protected boolean isTargetEntry()
isTargetEntry
in class FileReader
protected boolean processEntry(java.nio.ByteBuffer entryBuffer) throws DatabaseException
processEntry
in class FileReader
DatabaseException
public boolean isIN()
public boolean isLN()
public boolean isRoot()
public boolean isFileHeader()
public LN getLN()
public IN getIN() throws DatabaseException
DatabaseException
public FileHeader getFileHeader() throws DatabaseException
DatabaseException
public DatabaseId getDatabaseId()
public byte[] getKey()
public byte[] getDupTreeKey()