- Type Parameters:
T- The type of the events written to this segment.
- All Superinterfaces:
@Beta public interface SegmentIterator<T> extends java.util.Iterator<T>, java.lang.AutoCloseablePlease note this is an experimental API. Allows for reading data from a segment. Returns an item from
Iterator.next()for each event in the segment at the time of its creation. Once all the events that were in the segment at the time of the creation of the SegmentIterator have been returned
Iterator.hasNext()will return false. While buffering is used to avoid it, it is possible for
Iterator.next()to block on fetching the data. At any time
getOffset()can be called to get the byte offset in the segment the iterator is currently pointing to.
All Methods Instance Methods Abstract Methods Modifier and Type Method Description
close()Closes the iterator, freeing any resources associated with it.
getOffset()Provides the current offset in the segment.