|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.log.FileReader
com.sleepycat.je.log.CleanerFileReader
public class CleanerFileReader
CleanerFileReader scans log files for INs and LNs.
Field Summary |
---|
Fields inherited from class com.sleepycat.je.log.FileReader |
---|
anticipateChecksumErrors, cksumValidator, currentEntryChecksum, currentEntryOffset, currentEntryPrevOffset, currentEntrySize, currentEntryTypeNum, currentEntryTypeVersion, env, eof, fileManager, nextEntryOffset, readBufferFileEnd, readBufferFileNum, readBufferFileStart, startLsn |
Constructor Summary | |
---|---|
CleanerFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
Long fileNum)
Create this reader to start at a given LSN. |
Method Summary | |
---|---|
DatabaseId |
getDatabaseId()
Get the last databaseId seen by the reader. |
byte[] |
getDupTreeKey()
Get the last key seen by the reader. |
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,
Long fileNum)
Helper for determining the starting position and opening up a file at the desired location. |
boolean |
isIN()
|
boolean |
isLN()
|
boolean |
isRoot()
|
protected boolean |
isTargetEntry(byte entryTypeNum,
byte entryTypeVersion)
|
protected boolean |
processEntry(ByteBuffer entryBuffer)
This reader instantiates an LN and key for every LN entry. |
Methods inherited from class com.sleepycat.je.log.FileReader |
---|
getLastLsn, getNRepeatIteratorReads, getNumRead, readNextEntry, resyncReader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CleanerFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, Long fileNum) throws 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.
IOException
DatabaseException
Method Detail |
---|
protected void initStartingPosition(long endOfFileLsn, Long fileNum) throws IOException, DatabaseException
initStartingPosition
in class FileReader
IOException
DatabaseException
protected boolean isTargetEntry(byte entryTypeNum, byte entryTypeVersion)
isTargetEntry
in class FileReader
protected boolean processEntry(ByteBuffer entryBuffer) throws DatabaseException
processEntry
in class FileReader
DatabaseException
public boolean isIN()
public boolean isLN()
public boolean isRoot()
public LN getLN()
public IN getIN() throws DatabaseException
DatabaseException
public DatabaseId getDatabaseId()
public byte[] getKey()
public byte[] getDupTreeKey()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |