public class LNFileReader extends FileReader
FileReader.EOFException, FileReader.ReadWindow
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<LogEntryType,LogEntry> |
targetEntryMap |
protected LogEntry |
targetLogEntry |
cksumValidator, currentEntryHeader, currentEntryOffset, currentEntryPrevOffset, envImpl, eof, fileManager, forward, logger, nextEntryOffset, startLsn, window
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) |
java.lang.String |
dumpCurrentHeader() |
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.
|
LNLogEntry |
getLNLogEntry()
Get the last LN log entry seen by the reader.
|
byte |
getLogEntryType()
Return the type of this log entry.
|
java.lang.Object |
getMainItem() |
NameLNLogEntry |
getNameLNLogEntry()
Returns a NameLNLogEntry if the LN is a NameLN, or null otherwise.
|
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.
|
long |
getVLSN()
Return the VLSN if this entry is in replicated stream.
|
boolean |
isAbort() |
boolean |
isCommit() |
boolean |
isInvisible() |
boolean |
isLN() |
boolean |
isLNDeleted() |
boolean |
isPrepare() |
boolean |
isRollbackEnd() |
boolean |
isRollbackStart() |
protected boolean |
isTargetEntry() |
protected boolean |
processEntry(java.nio.ByteBuffer entryBuffer)
This reader instantiates an LN and key for every LN entry.
|
entryIsReplicated, getAndResetNReads, getLastEntrySize, getLastLsn, getNRepeatIteratorReads, getNumRead, initStartingPosition, makeWindow, readNextEntry, readNextEntryAllowExceptions, resyncReader, setAlwaysValidateChecksum, setBackwardPosition, setForwardPosition, skipData, skipEntry, threadSafeBufferFlip, threadSafeBufferPosition, threadSafeBufferPosition
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 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.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
entryBuffer
- contains the entry data and is positioned at the
dataDatabaseException
public boolean isLN()
public LNLogEntry getLNLogEntry()
public NameLNLogEntry getNameLNLogEntry()
public boolean isLNDeleted()
public DatabaseId getDatabaseId()
public java.lang.Long getTxnId()
public boolean isPrepare()
public long getTxnPrepareId()
public javax.transaction.xa.Xid getTxnPrepareXid()
public boolean isCommit()
public boolean isRollbackStart()
public boolean isRollbackEnd()
public java.lang.Object getMainItem()
public java.lang.String dumpCurrentHeader()
public boolean isAbort()
public long getTxnAbortId()
public long getTxnCommitId()
public long getAbortLsn()
public boolean getAbortKnownDeleted()
public boolean isInvisible()
public byte getLogEntryType()
public long getVLSN()
Copyright (c) 2004-2012 Oracle. All rights reserved.