public class CdcrUpdateLog.CdcrLogReader extends Object
Modifier and Type | Method and Description |
---|---|
void |
close()
Closes streams and remove the associated
CdcrUpdateLog.CdcrLogPointer from the
parent CdcrUpdateLog . |
void |
forwardSeek(CdcrUpdateLog.CdcrLogReader subReader)
Expert: Fast forward this log reader with a log subreader.
|
long |
getLastVersion()
Returns the absolute form of the version number of the last entry read.
|
long |
getNumberOfRemainingRecords()
Returns the number of remaining records (including commit but excluding header) to be read in the logs.
|
CdcrUpdateLog.CdcrLogReader |
getSubReader()
Expert: Instantiate a sub-reader.
|
Object |
next()
Advances to the next log entry in the updates log and returns the log entry itself.
|
void |
resetToLastPosition()
If called after
next() , it resets the reader to its last position. |
boolean |
seek(long targetVersion)
Advances to the first beyond the current whose version number is greater
than or equal to targetVersion.
Returns true if the reader has been advanced. |
public CdcrUpdateLog.CdcrLogReader getSubReader()
forwardSeek(org.apache.solr.update.CdcrUpdateLog.CdcrLogReader)
.public void forwardSeek(CdcrUpdateLog.CdcrLogReader subReader)
getSubReader()
.public Object next() throws IOException, InterruptedException
NOTE: after the reader has exhausted, you can call again this method since the updates log might have been updated with new entries.
IOException
InterruptedException
public boolean seek(long targetVersion) throws IOException, InterruptedException
next()
will probably return null.
NOTE: This method must be called before the first call to next()
.
IOException
InterruptedException
public void resetToLastPosition()
next()
, it resets the reader to its last position.public long getNumberOfRemainingRecords()
public void close()
CdcrUpdateLog.CdcrLogPointer
from the
parent CdcrUpdateLog
.public long getLastVersion()
Copyright © 2000-2021 Apache Software Foundation. All Rights Reserved.