public class DelegatingJournalReader<E> extends Object implements JournalReader<E>
| Constructor and Description |
|---|
DelegatingJournalReader(JournalReader<E> delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
Indexed<E> |
getCurrentEntry()
Returns the last read entry.
|
long |
getCurrentIndex()
Returns the current reader index.
|
long |
getNextIndex()
Returns the next reader index.
|
boolean |
hasNext()
Returns whether the reader has a next entry to read.
|
Indexed<E> |
next()
Returns the next entry in the reader.
|
void |
reset()
Resets the reader to the start.
|
void |
reset(long index)
Resets the reader to the given index.
|
String |
toString() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitforEachRemaining, removepublic DelegatingJournalReader(JournalReader<E> delegate)
public long getCurrentIndex()
JournalReadergetCurrentIndex in interface JournalReader<E>public Indexed<E> getCurrentEntry()
JournalReadergetCurrentEntry in interface JournalReader<E>public long getNextIndex()
JournalReadergetNextIndex in interface JournalReader<E>public boolean hasNext()
JournalReaderpublic Indexed<E> next()
JournalReaderpublic void reset()
JournalReaderreset in interface JournalReader<E>public void reset(long index)
JournalReaderreset in interface JournalReader<E>index - The index to which to reset the reader.public void close()
close in interface JournalReader<E>close in interface AutoCloseableCopyright © 2013–2018. All rights reserved.