Package io.pravega.client.stream.impl
Class ReaderGroupStateManager
- java.lang.Object
-
- io.pravega.client.stream.impl.ReaderGroupStateManager
-
public class ReaderGroupStateManager extends java.lang.ObjectManages the state of the reader group on behalf of a reader.initializeReader(long)must be called upon reader startup before any other methods.readerShutdown(Position)should be called when the reader is shutting down. After this method is called no other methods should be called on this class. This class updates makes transitions using theReaderGroupStateobject. If there are available segments a reader can acquire them by callingacquireNewSegmentsIfNeeded(long, Position). To balance load across multiple readers a reader can release segments so that other readers can acquire them by callingreleaseSegment(Segment, long, long, Position). A reader can tell if calling this method is needed by callingfindSegmentToReleaseIfRequired()Finally when a segment is sealed it may have one or more successors. So when a reader comes to the end of a segment it should callhandleEndOfSegment(SegmentWithRange)so that it can continue reading from the successor to that segment.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetGroupName()java.lang.StringgetReaderId()java.lang.StringgetScope()
-