Package com.eventstore.dbclient
Class SubscribeToStreamOptions
java.lang.Object
com.eventstore.dbclient.SubscribeToStreamOptions
Options of the subscribe to stream request.
-
Method Summary
Modifier and TypeMethodDescriptionauthenticated(UserCredentials credentials) Sets user credentials for the requestauthenticated(String login, String password) Sets user credentials for the requestbatchSize(int batchSize) The maximum number of events to read from the server at the time.deadline(long durationInMs) A length of time (in milliseconds) to use for gRPC deadlines.fromEnd()Starts from the end of the stream.fromRevision(long revision) Starts from the given event revision.fromRevision(StreamPosition<Long> startRevision) Starts from a stream position.Starts from the beginning of the stream.static SubscribeToStreamOptionsget()Returns options with default values.Adds a custom HTTP header that will be added to the request.Do not require the request to be performed by the leader of the cluster.Don't resolve linkTo events to their linked events.Requires the request to be performed by the leader of the cluster.requiresLeader(boolean value) If true, requires the request to be performed by the leader of the cluster.Resolve linkTo events to their linked events.resolveLinkTos(boolean value) Whether the subscription should resolve linkTo events to their linked events.thresholdRatio(float ratio) The ratio of the batch size at which more events should be requested from the server.
-
Method Details
-
get
Returns options with default values. -
fromRevision
Starts from a stream position. -
fromStart
Starts from the beginning of the stream. -
fromEnd
Starts from the end of the stream. -
fromRevision
Starts from the given event revision. -
batchSize
The maximum number of events to read from the server at the time. -
thresholdRatio
The ratio of the batch size at which more events should be requested from the server. -
resolveLinkTos
Whether the subscription should resolve linkTo events to their linked events. Default: false. -
resolveLinkTos
Resolve linkTo events to their linked events. -
notResolveLinkTos
Don't resolve linkTo events to their linked events. -
authenticated
Sets user credentials for the request- Parameters:
credentials-- Returns:
- updated options
- See Also:
-
authenticated
Sets user credentials for the request- Parameters:
login-password-- Returns:
- updated options
-
requiresLeader
Requires the request to be performed by the leader of the cluster.- Returns:
- updated options
-
notRequireLeader
Do not require the request to be performed by the leader of the cluster.- Returns:
- updated options
-
requiresLeader
If true, requires the request to be performed by the leader of the cluster.- Parameters:
value-- Returns:
- updated options
-
deadline
A length of time (in milliseconds) to use for gRPC deadlines.- Parameters:
durationInMs-- Returns:
-
header
Adds a custom HTTP header that will be added to the request.
-