Class StreamCutImpl

    • Constructor Detail

      • StreamCutImpl

        public StreamCutImpl​(Stream stream,
                             java.util.Map<Segment,​java.lang.Long> positions)
    • Method Detail

      • getPositions

        public java.util.Map<Segment,​java.lang.Long> getPositions()
        Description copied from class: StreamCutInternal
        Get a mapping of Segment and its offset.
        Specified by:
        getPositions in class StreamCutInternal
        Returns:
        Map of Segment to its offset.
      • asImpl

        public StreamCutInternal asImpl()
        Description copied from interface: StreamCut
        Used internally. Do not call.
        Returns:
        Implementation of EventPointer interface
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • asText

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

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

        public boolean validate​(java.util.Set<java.lang.String> segmentNames)
      • toBytes

        public java.nio.ByteBuffer toBytes()
        Description copied from interface: StreamCut
        Serializes the cut to a compact byte array.
        Returns:
        A serialized version of this streamcut.
      • fromBytes

        public static StreamCutInternal fromBytes​(java.nio.ByteBuffer buff)
        Description copied from interface: StreamCut
        Deserializes the cut from its serialized from obtained from calling StreamCut.toBytes().
        Parameters:
        buff - A serialized position.
        Returns:
        The StreamCut object.
      • builder

        public static io.pravega.client.stream.impl.StreamCutImpl.StreamCutBuilder builder()
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • canEqual

        protected boolean canEqual​(java.lang.Object other)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object