|
|||||||||
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.LNFileReader
public class LNFileReader
LNFileReader scans log files for LNs. Also, if it's going backwards for the undo phase in recovery, it reads transaction commit entries.
Field Summary | |
---|---|
protected Map |
targetEntryMap
|
protected LogEntry |
targetLogEntry
|
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 | |
---|---|
LNFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
boolean redo,
long endOfFileLsn,
long finishLsn,
Long singleFileNum)
Create this reader to start at a given LSN. |
Method Summary | |
---|---|
void |
addTargetType(LogEntryType entryType)
|
boolean |
getAbortKnownDeleted()
Get last abort known deleted seen by the reader. |
long |
getAbortLsn()
Get last abort LSN seen by the reader (may be null). |
DatabaseId |
getDatabaseId()
Get the last databaseId seen by the reader. |
byte[] |
getDupTreeKey()
Get the last key seen by the reader. |
byte[] |
getKey()
Get the last key seen by the reader. |
LN |
getLN()
Get the last LN seen by the reader. |
long |
getNodeId()
Get node id of current LN. |
long |
getTxnAbortId()
Get the last txn abort id seen by the reader. |
long |
getTxnCommitId()
Get the last txn commit id seen by the reader. |
Long |
getTxnId()
|
long |
getTxnPrepareId()
Get the last txn prepare id seen by the reader. |
Xid |
getTxnPrepareXid()
Get the last txn prepare Xid seen by the reader. |
boolean |
isAbort()
|
boolean |
isLN()
|
boolean |
isPrepare()
|
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, initStartingPosition, readNextEntry, resyncReader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map targetEntryMap
protected LogEntry targetLogEntry
Constructor Detail |
---|
public LNFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, boolean redo, long endOfFileLsn, long finishLsn, Long singleFileNum) throws IOException, DatabaseException
env
- The relevant EnvironmentImplreadBufferSize
- buffer size in bytes for reading in logstartLsn
- where to start in the logredo
- If false, we're going to go forward from
the start LSN to the end of the log. If true, we're going
backwards from the end of the log to the start LSN.endOfFileLsn
- the virtual LSN that marks the end of the log. (The
one off the end of the log). Only used if we're reading backwards.
Different from the startLsn because the startLsn tells us where the
beginning of the start entry is, but not the length/end of the start
entry. May be null if we're going foward.finishLsn
- the last LSN to read in the log. May be null if we
want to read to the end of the log.
IOException
DatabaseException
Method Detail |
---|
public void addTargetType(LogEntryType entryType) throws DatabaseException
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 isLN()
public LN getLN()
public DatabaseId getDatabaseId()
public byte[] getKey()
public byte[] getDupTreeKey()
public Long getTxnId()
public boolean isPrepare()
public long getTxnPrepareId()
public Xid getTxnPrepareXid()
public boolean isAbort()
public long getTxnAbortId()
public long getTxnCommitId()
public long getNodeId()
public long getAbortLsn()
public boolean getAbortKnownDeleted()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |