Class SubscribeToAllOptions

java.lang.Object
com.eventstore.dbclient.SubscribeToAllOptions

public class SubscribeToAllOptions extends Object
Options of a subscription to $all request.
  • Method Details

    • get

      public static SubscribeToAllOptions get()
      Returns options with default values.
    • filter

      public SubscribeToAllOptions filter(SubscriptionFilter filter)
      Applies a server-side filter to determine if an event of the subscription should be yielded.
    • fromStart

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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