|
|||||||||
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.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sleepycat.je.log.FileReader |
---|
FileReader.EOFException, FileReader.ReadWindow |
Field Summary |
---|
Fields inherited from class com.sleepycat.je.log.FileReader |
---|
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window |
Constructor Summary | |
---|---|
INFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
long finishLsn,
boolean trackIds,
boolean mapDbOnly,
long partialCkptStart,
long ckptEnd,
RecoveryUtilizationTracker tracker)
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. |
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. |
int |
getMinReplicatedDbId()
|
long |
getMinReplicatedNodeId()
|
long |
getMinReplicatedTxnId()
|
VLSNRecoveryProxy |
getVLSNProxy()
|
boolean |
isDeleteInfo()
|
boolean |
isDupDeleteInfo()
|
protected boolean |
isTargetEntry()
If we're tracking node, database and txn ids, we want to see all node log entries. |
protected boolean |
processEntry(ByteBuffer entryBuffer)
This reader returns non-provisional INs and IN delete entries. |
Methods inherited from class com.sleepycat.je.log.FileReader |
---|
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntry, readNextEntryAllowExceptions, resyncReader, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, threadSafeBufferFlip, threadSafeBufferPosition, threadSafeBufferPosition |
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, long ckptEnd, RecoveryUtilizationTracker tracker) throws DatabaseException
DatabaseException
Method Detail |
---|
public void addTargetType(LogEntryType entryType) throws DatabaseException
DatabaseException
protected boolean isTargetEntry() throws DatabaseException
isTargetEntry
in class FileReader
DatabaseException
- from subclasses.protected boolean processEntry(ByteBuffer entryBuffer) throws DatabaseException
processEntry
in class FileReader
entryBuffer
- contains the entry data and is positioned at the
data
DatabaseException
public IN getIN() throws DatabaseException
DatabaseException
public DatabaseId getDatabaseId()
public long getMaxNodeId()
public long getMinReplicatedNodeId()
public int getMaxDbId()
public int getMinReplicatedDbId()
public long getMaxTxnId()
public long getMinReplicatedTxnId()
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 VLSNRecoveryProxy getVLSNProxy()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |