Class ReadAllOptions

java.lang.Object
com.eventstore.dbclient.ReadAllOptions

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

    • get

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

      public ReadAllOptions direction(Direction direction)
      Reads stream in the given direction.
    • 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 ReadAllOptions fromStart()
      Starts from the beginning of the $all stream.
    • fromEnd

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

      public ReadAllOptions fromPosition(Position position)
      Starts from the given transaction log position.
      Parameters:
      position - transaction log position.
    • batchSize

      public ReadAllOptions batchSize(int batchSize)
      The maximum number of events to read from the server at the time.
    • thresholdRatio

      public ReadAllOptions thresholdRatio(float ratio)
      The ratio of the batch size at which more events should be requested from the server.
    • resolveLinkTos

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

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

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

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

      public ReadAllOptions authenticated(String login, String password)
      Sets user credentials for the request
      Parameters:
      login -
      password -
      Returns:
      updated options
    • requiresLeader

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

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

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

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

      public ReadAllOptions header(String key, String value)
      Adds a custom HTTP header that will be added to the request.