public class Reader
extends java.lang.Object
implements java.util.Iterator<java.lang.Integer>, java.lang.AutoCloseable
| Constructor and Description |
|---|
Reader(java.io.File file) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
forEachRemaining(java.util.function.Consumer<? super java.lang.Integer> action) |
java.io.File |
getFile() |
Header |
getFileHeader() |
long |
getFilePointer() |
int |
getFirstKeySnapshotBefore(int index) |
int |
getIndexBeforeForTag(java.lang.String tag) |
int |
getIndexBeforeOrEqualsTimestamp(long timestamp) |
java.util.List<Segment> |
getReplayableSnapshotSegmentsUntil(int index) |
java.util.List<java.lang.Integer> |
getSegmentAddresses() |
Segment |
getSnapshotAt(int index) |
java.util.List<Segment> |
getSnapshots() |
java.util.List<Segment> |
getSnapshotSegmentsByRange(int start,
int end) |
boolean |
hasNext() |
java.lang.Integer |
next() |
Segment |
nextSegment() |
Segment |
readSegmentByAddress(int address) |
void |
remove() |
void |
reset() |
void |
skip() |
public Reader(java.io.File file)
throws java.io.IOException
java.io.IOExceptionpublic boolean hasNext()
hasNext in interface java.util.Iterator<java.lang.Integer>public java.lang.Integer next()
next in interface java.util.Iterator<java.lang.Integer>public Segment nextSegment() throws java.io.IOException
java.io.IOExceptionpublic void remove()
remove in interface java.util.Iterator<java.lang.Integer>public void forEachRemaining(java.util.function.Consumer<? super java.lang.Integer> action)
forEachRemaining in interface java.util.Iterator<java.lang.Integer>public final void reset()
throws java.io.IOException
java.io.IOExceptionpublic long getFilePointer()
public Header getFileHeader()
public void skip()
public java.util.List<java.lang.Integer> getSegmentAddresses()
throws java.io.IOException
java.io.IOExceptionpublic java.util.List<Segment> getReplayableSnapshotSegmentsUntil(int index) throws java.lang.Exception
index - Inclusive.java.lang.Exceptionpublic java.util.List<Segment> getSnapshotSegmentsByRange(int start, int end) throws java.io.IOException
start - inclusive.end - exclusive.java.io.IOExceptionpublic int getFirstKeySnapshotBefore(int index)
throws java.io.IOException
java.io.IOExceptionpublic Segment readSegmentByAddress(int address) throws java.io.IOException
java.io.IOExceptionpublic Segment getSnapshotAt(int index) throws java.io.IOException
java.io.IOExceptionpublic java.util.List<Segment> getSnapshots() throws java.io.IOException
java.io.IOExceptionpublic int getIndexBeforeForTag(java.lang.String tag)
throws java.io.IOException
java.io.IOExceptionpublic int getIndexBeforeOrEqualsTimestamp(long timestamp)
throws java.io.IOException
java.io.IOExceptionpublic void close()
close in interface java.lang.AutoCloseablepublic java.io.File getFile()