Interface PersistentStreamSegment

    • Field Detail

      • PENDING_WORK_DONE_MARKER

        static final long PENDING_WORK_DONE_MARKER
        Acknowledgement value to indicate that all events processed after a segment is closed
        See Also:
        Constant Field Values
    • Method Detail

      • onSegmentClosed

        void onSegmentClosed​(Runnable callback)
        Registers a callback that will be invoked when Axon Server closes the segment within the persistent stream connection. This happens when the number of segments in the persistent stream has changed or when Axon Server assigns a segment to another client.
        Parameters:
        callback - the callback to register
      • acknowledge

        void acknowledge​(long token)
        Sends the last processed token for this segment to Axon Server. Clients may choose to notify each processed event, or to only sent progress information after a number of processed events.
        Parameters:
        token - the last processed token for this segment
      • error

        void error​(String error)
      • segment

        int segment()
        Returns the segment number of the stream.
        Returns:
        the segment number of this stream