Package com.eventstore.dbclient
Class ReadStreamOptions
java.lang.Object
com.eventstore.dbclient.ReadStreamOptions
Options of the read stream request.
-
Method Summary
Modifier and TypeMethodDescriptionauthenticated(UserCredentials credentials) Sets user credentials for the requestauthenticated(String login, String password) Sets user credentials for the requestReads stream in revision-descending order.batchSize(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.Reads stream in the given direction.forwards()Reads stream in revision-ascending order.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 ReadStreamOptionsget()Returns options with default values.Adds a custom HTTP header that will be added to the request.maxCount(long maxCount) The maximum event count EventStoreDB will return.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. -
direction
Reads stream in the given direction. -
forwards
Reads stream in revision-ascending order. -
backwards
Reads stream in revision-descending order. -
maxCount
The maximum event count EventStoreDB will return. -
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.
-