public class ReadStreamOptions
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
T |
authenticated(java.lang.String login,
java.lang.String password)
Sets user credentials for the request
|
T |
authenticated(UserCredentials credentials)
Sets user credentials for the request
|
ReadStreamOptions |
backwards()
Reads stream in revision-descending order.
|
T |
batchSize(int batchSize)
The maximum number of events to read from the server at the time.
|
T |
deadline(long durationInMs)
A length of time (in milliseconds) to use for gRPC deadlines.
|
ReadStreamOptions |
direction(Direction direction)
Reads stream in the given direction.
|
ReadStreamOptions |
forwards()
Reads stream in revision-ascending order.
|
T |
fromEnd()
Starts from the end of the stream.
|
T |
fromRevision(long revision)
Starts from the given event revision.
|
T |
fromRevision(StreamPosition<java.lang.Long> startRevision)
Starts from a stream position.
|
T |
fromStart()
Starts from the beginning of the stream.
|
static ReadStreamOptions |
get()
Returns options with default values.
|
T |
header(java.lang.String key,
java.lang.String value)
Adds a custom HTTP header that will be added to the request.
|
ReadStreamOptions |
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.
|
T |
thresholdRatio(float ratio)
The ratio of the batch size at which more events should be requested from the server.
|
public static ReadStreamOptions get()
public ReadStreamOptions direction(Direction direction)
public ReadStreamOptions forwards()
public ReadStreamOptions backwards()
public ReadStreamOptions maxCount(long maxCount)
public T fromRevision(StreamPosition<java.lang.Long> startRevision)
public T fromStart()
public T fromEnd()
public T fromRevision(long revision)
public T batchSize(int batchSize)
public T thresholdRatio(float ratio)
public T resolveLinkTos(boolean value)
public T resolveLinkTos()
public T notResolveLinkTos()
public T authenticated(UserCredentials credentials)
credentials - UserCredentialspublic T authenticated(java.lang.String login,
java.lang.String password)
login - password - public T requiresLeader()
public T notRequireLeader()
public T requiresLeader(boolean value)
value - public T deadline(long durationInMs)
durationInMs - public T header(java.lang.String key,
java.lang.String value)