Package io.pravega.client.stream.impl
Class PositionInternal
- java.lang.Object
-
- io.pravega.client.stream.impl.PositionInternal
-
- All Implemented Interfaces:
Position
- Direct Known Subclasses:
PositionImpl
public abstract class PositionInternal extends java.lang.Object implements Position
A position has ownedSegments -- segments that can be read currently (or have been completed and not yet replaced). A Position obtained at any given point will return a segment for all of the keyspace owned by the reader. Each ownedSegment also has an offset indicating the point until which events have been read from that segment. Completely read segments have offset of -1.We say that a position object P is well-formed to denote that every segment `s` in `P` is not a predecessor of any segment in ownedSegments.
-
-
Constructor Summary
Constructors Constructor Description PositionInternal()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static PositionfromBytes(java.nio.ByteBuffer position)Deserializes the position from its serialized from obtained from callingPosition.toBytes().
-
-
-
Method Detail
-
fromBytes
public static Position fromBytes(java.nio.ByteBuffer position)
Deserializes the position from its serialized from obtained from callingPosition.toBytes().- Parameters:
position- A serialized position.- Returns:
- The position object.
-
-