Interface StreamCut

  • All Superinterfaces:
    java.io.Serializable
    All Known Implementing Classes:
    StreamCutImpl, StreamCutInternal

    public interface StreamCut
    extends java.io.Serializable
    A set of segment/offset pairs for a single stream that represent a consistent position in the stream. (IE: Segment 1 and 2 will not both appear in the set if 2 succeeds 1, and if 0 appears and is responsible for keyspace 0-0.5 then other segments covering the range 0.5-1.0 will also be included.)
    • Field Detail

      • UNBOUNDED

        static final StreamCut UNBOUNDED
        This is used represents an unbounded StreamCut. This is used when the user wants to refer to the current HEAD of the stream or the current TAIL of the stream.
    • Method Detail

      • asImpl

        StreamCutInternal asImpl()
        Used internally. Do not call.
        Returns:
        Implementation of EventPointer interface
      • toBytes

        java.nio.ByteBuffer toBytes()
        Serializes the cut to a compact byte array.
        Returns:
        A serialized version of this streamcut.
      • asText

        java.lang.String asText()
        Obtains the compact base64 string representation of StreamCut.
        Returns:
        Base64 representation of the StreamCut.
      • from

        static StreamCut from​(java.lang.String base64String)
        Obtains the a StreamCut object from its Base64 representation obtained via asText().
        Parameters:
        base64String - Base64 representation of StreamCut obtained using asText()
        Returns:
        The StreamCut object
      • fromBytes

        static StreamCut fromBytes​(java.nio.ByteBuffer cut)
        Deserializes the cut from its serialized from obtained from calling toBytes().
        Parameters:
        cut - A serialized position.
        Returns:
        The StreamCut object.