public class LNFileReader extends FileReader
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<LogEntryType,LogEntry> |
targetEntryMap |
protected LogEntry |
targetLogEntry |
anticipateChecksumErrors, cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, nextEntryOffset, readBufferFileEnd, readBufferFileNum, readBufferFileStart, startLsn
Constructor and Description |
---|
LNFileReader(EnvironmentImpl env,
int readBufferSize,
long startLsn,
boolean redo,
long endOfFileLsn,
long finishLsn,
java.lang.Long singleFileNum,
long ckptEnd)
Create this reader to start at a given LSN.
|
Modifier and Type | Method and Description |
---|---|
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.
|
MapLN |
getMapLN()
Returns a MapLN if the LN is a MapLN, or null otherwise.
|
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.
|
java.lang.Long |
getTxnId() |
long |
getTxnPrepareId()
Get the last txn prepare id seen by the reader.
|
javax.transaction.xa.Xid |
getTxnPrepareXid()
Get the last txn prepare Xid seen by the reader.
|
boolean |
isAbort() |
boolean |
isLN() |
boolean |
isPrepare() |
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, initStartingPosition, readNextEntry, resyncReader, setAlwaysValidateChecksum
protected java.util.Map<LogEntryType,LogEntry> targetEntryMap
protected LogEntry targetLogEntry
public LNFileReader(EnvironmentImpl env, int readBufferSize, long startLsn, boolean redo, long endOfFileLsn, long finishLsn, java.lang.Long singleFileNum, long ckptEnd) throws java.io.IOException, DatabaseException
env
- The relevant EnvironmentImplreadBufferSize
- buffer size in bytes for reading in logstartLsn
- where to start in the logredo
- If true, we're going to go forward from
the start LSN to the end of the log. If false, we're going
backwards from the end of the log to the start LSN.finishLsn
- the last LSN to read in the log. May be null if we
want to read to the end of the log.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.java.io.IOException
DatabaseException
public void addTargetType(LogEntryType entryType) throws DatabaseException
DatabaseException
protected boolean isTargetEntry()
isTargetEntry
in class FileReader
protected boolean processEntry(java.nio.ByteBuffer entryBuffer) throws DatabaseException
processEntry
in class FileReader
DatabaseException
public boolean isLN()
public LN getLN()
public MapLN getMapLN()
public DatabaseId getDatabaseId()
public byte[] getKey()
public byte[] getDupTreeKey()
public java.lang.Long getTxnId()
public boolean isPrepare()
public long getTxnPrepareId()
public javax.transaction.xa.Xid getTxnPrepareXid()
public boolean isAbort()
public long getTxnAbortId()
public long getTxnCommitId()
public long getNodeId()
public long getAbortLsn()
public boolean getAbortKnownDeleted()