Class ReadStreamOptions


  • public class ReadStreamOptions
    extends java.lang.Object
    Options of the read stream request.
    • Method Detail

      • forwards

        public ReadStreamOptions forwards()
        Reads stream in revision-ascending order.
      • backwards

        public ReadStreamOptions backwards()
        Reads stream in revision-descending order.
      • maxCount

        public ReadStreamOptions maxCount​(long maxCount)
        The maximum event count EventStoreDB will return.
      • fromRevision

        public T fromRevision​(StreamPosition<java.lang.Long> startRevision)
        Starts from a stream position.
      • fromStart

        public T fromStart()
        Starts from the beginning of the stream.
      • fromEnd

        public T fromEnd()
        Starts from the end of the stream.
      • fromRevision

        public T fromRevision​(long revision)
        Starts from the given event revision.
      • resolveLinkTos

        public T resolveLinkTos​(boolean value)
        Whether the subscription should resolve linkTo events to their linked events. Default: false.
      • resolveLinkTos

        public T resolveLinkTos()
        Resolve linkTo events to their linked events.
      • notResolveLinkTos

        public T notResolveLinkTos()
        Don't resolve linkTo events to their linked events.
      • authenticated

        public T authenticated​(UserCredentials credentials)
        Sets user credentials for the request
        Parameters:
        credentials -
        Returns:
        updated options
        See Also:
        UserCredentials
      • authenticated

        public T authenticated​(java.lang.String login,
                               java.lang.String password)
        Sets user credentials for the request
        Parameters:
        login -
        password -
        Returns:
        updated options
      • requiresLeader

        public T requiresLeader()
        Requires the request to be performed by the leader of the cluster.
        Returns:
        updated options
      • notRequireLeader

        public T notRequireLeader()
        Do not require the request to be performed by the leader of the cluster.
        Returns:
        updated options
      • requiresLeader

        public T requiresLeader​(boolean value)
        If true, requires the request to be performed by the leader of the cluster.
        Parameters:
        value -
        Returns:
        updated options
      • deadline

        public T deadline​(long durationInMs)
        A length of time (in milliseconds) to use for gRPC deadlines.
        Parameters:
        durationInMs -
        Returns: