Class ReadAllOptions


  • public class ReadAllOptions
    extends java.lang.Object
    Options of the read $all stream request.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      T authenticated​(UserCredentials credentials)
      Sets user credentials for the request
      T authenticated​(java.lang.String login, java.lang.String password)
      Sets user credentials for the request
      ReadAllOptions backwards()
      Reads stream in revision-descending order.
      T deadline​(long durationInMs)
      A length of time (in milliseconds) to use for gRPC deadlines.
      ReadAllOptions direction​(Direction direction)
      Reads stream in the given direction.
      ReadAllOptions forwards()
      Reads stream in revision-ascending order.
      T fromEnd()
      Starts from the end of the $all stream.
      T fromPosition​(Position position)
      Starts from the given transaction log position.
      T fromStart()
      Starts from the beginning of the $all stream.
      static ReadAllOptions get()
      Returns options with default values.
      ReadAllOptions maxCount​(long maxCount)
      The maximum event count EventStoreDB will return.
      T notRequireLeader()
      Do not require the request to be performed by the leader of the cluster.
      T notResolveLinkTos()
      Don't resolve linkTo events to their linked events.
      T requiresLeader()
      Requires the request to be performed by the leader of the cluster.
      T requiresLeader​(boolean value)
      If true, requires the request to be performed by the leader of the cluster.
      T resolveLinkTos()
      Resolve linkTo events to their linked events.
      T resolveLinkTos​(boolean value)
      Whether the subscription should resolve linkTo events to their linked events.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • get

        public static ReadAllOptions get()
        Returns options with default values.
      • forwards

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

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

        public ReadAllOptions maxCount​(long maxCount)
        The maximum event count EventStoreDB will return.
      • fromStart

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

        public T fromEnd()
        Starts from the end of the $all stream.
      • fromPosition

        public T fromPosition​(Position position)
        Starts from the given transaction log position.
        Parameters:
        position - transaction log position.
      • 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: