|
|||||||||
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.INFileReader
public class INFileReader
INFileReader supports recovery by scanning log files during the IN rebuild pass. It looks for internal nodes (all types), segregated by whether they belong to the main tree or the duplicate trees.
This file reader can also be run in tracking mode to keep track of the maximum node id, database id and txn id seen so those sequences can be updated properly at recovery. In this mode it also performs utilization counting. It is only run once in tracking mode per recovery, in the first phase of recovery.
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 | |
---|---|
INFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
long finishLsn,
boolean trackIds,
boolean mapDbOnly,
long partialCkptStart,
Map fileSummaryLsns)
Create this reader to start at a given LSN. |
Method Summary | |
---|---|
void |
addTargetType(LogEntryType entryType)
Configure this reader to target this kind of entry. |
DatabaseId |
getDatabaseId()
Get the last databaseId seen by the reader. |
byte[] |
getDeletedIdKey()
Get the deleted id key stored in the last delete info log entry. |
long |
getDeletedNodeId()
Get the deleted node id stored in the last delete info log entry. |
byte[] |
getDupDeletedDupKey()
Get the deleted main key stored in the last delete info log entry. |
byte[] |
getDupDeletedMainKey()
Get the deleted main key stored in the last delete info log entry. |
long |
getDupDeletedNodeId()
Get the deleted node id stored in the last delete info log entry. |
IN |
getIN()
Get the last IN seen by the reader. |
LogEntryType |
getLogEntryType()
Get the current log entry type. |
long |
getLsnOfIN()
Get the LSN that should represent this IN. |
int |
getMaxDbId()
Get the maximum db id seen by the reader. |
long |
getMaxNodeId()
Get the maximum node id seen by the reader. |
long |
getMaxTxnId()
Get the maximum txn id seen by the reader. |
boolean |
isDeleteInfo()
|
boolean |
isDupDeleteInfo()
|
protected boolean |
isTargetEntry(byte entryTypeNum,
byte entryTypeVersion)
If we're tracking node, database and txn ids, we want to see all node log entries. |
protected boolean |
processEntry(ByteBuffer entryBuffer)
This reader looks at all nodes for the max node id and database id. |
Methods inherited from class com.sleepycat.je.log.FileReader |
---|
getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, readNextEntry, resyncReader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public INFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, long finishLsn, boolean trackIds, boolean mapDbOnly, long partialCkptStart, Map fileSummaryLsns) throws IOException, DatabaseException
IOException
DatabaseException
Method Detail |
---|
public void addTargetType(LogEntryType entryType) throws DatabaseException
DatabaseException
protected boolean isTargetEntry(byte entryTypeNum, byte entryTypeVersion) throws DatabaseException
isTargetEntry
in class FileReader
DatabaseException
protected boolean processEntry(ByteBuffer entryBuffer) throws DatabaseException
processEntry
in class FileReader
DatabaseException
public IN getIN() throws DatabaseException
DatabaseException
public DatabaseId getDatabaseId()
public long getMaxNodeId()
public int getMaxDbId()
public long getMaxTxnId()
public boolean isDeleteInfo()
public boolean isDupDeleteInfo()
public long getDeletedNodeId()
public byte[] getDeletedIdKey()
public long getDupDeletedNodeId()
public byte[] getDupDeletedMainKey()
public byte[] getDupDeletedDupKey()
public long getLsnOfIN()
public LogEntryType getLogEntryType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |