Package com.eventstore.dbclient
Class CreatePersistentSubscriptionToAllOptions
- java.lang.Object
-
- com.eventstore.dbclient.CreatePersistentSubscriptionToAllOptions
-
public class CreatePersistentSubscriptionToAllOptions extends java.lang.Object
Options of create persistent subscription to $all request.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description T
authenticated(UserCredentials credentials)
Sets user credentials for the requestT
authenticated(java.lang.String login, java.lang.String password)
Sets user credentials for the requestT
checkpointAfter(java.time.Duration value)
The amount of time to try to checkpoint after.T
checkpointAfterInMs(int value)
The amount of time in milliseconds to try to checkpoint after.T
checkpointLowerBound(int value)
The minimum number of messages to process before a checkpoint may be written.T
checkpointUpperBound(int value)
The maximum number of messages not checkpointed before forcing a checkpoint.T
deadline(long durationInMs)
A length of time (in milliseconds) to use for gRPC deadlines.T
disableExtraStatistics()
Disable tracking of latency statistics on this subscription.T
disableLinkResolution()
Deprecated.prefernotResolveLinkTos()
T
enableExtraStatistics()
Enable tracking of latency statistics on this subscription.T
enableLinkResolution()
Deprecated.preferresolveLinkTos()
T
extraStatistics(boolean value)
Whether to track latency statistics on this subscription.CreatePersistentSubscriptionToAllOptions
filter(SubscriptionFilter filter)
Applies a server-side filter to determine if an event of the subscription should be yielded.CreatePersistentSubscriptionToAllOptions
fromEnd()
Starts the subscription from the end of the $all stream.CreatePersistentSubscriptionToAllOptions
fromStart()
Starts the subscription from the beginning of the $all stream.static CreatePersistentSubscriptionToAllOptions
get()
Returns options with default values.T
historyBufferSize(int value)
The number of events to cache when catching up.T
liveBufferSize(int value)
The size of the buffer (in-memory) listening to live messages as they happen before paging occurs.T
maxCheckpointCount(int value)
Deprecated.prefercheckpointUpperBound(int)
T
maxRetryCount(int value)
The maximum number of retries (due to timeout) before a message is considered to be parked.T
maxSubscriberCount(int value)
The maximum number of subscribers allowed.T
messageTimeout(java.time.Duration value)
The amount of time after which to consider a message as timed out and retried.T
messageTimeoutInMs(int value)
The amount of time in milliseconds after which to consider a message as timed out and retried.T
minCheckpointCount(int value)
Deprecated.prefercheckpointLowerBound(int)
T
namedConsumerStrategy(NamedConsumerStrategy value)
The strategy to use for distributing events to client consumers.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
readBatchSize(int value)
The number of events read at a time when catching up.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
resolveLinks(boolean value)
Deprecated.preferresolveLinkTos(boolean)
T
resolveLinkTos()
Resolve linkTo events to their linked events.T
resolveLinkTos(boolean value)
Whether the subscription should resolve linkTo events to their linked events.CreatePersistentSubscriptionToAllOptions
startFrom(long unsignedPrepare, long unsignedCommit)
Starts the subscription from the given transaction log position.CreatePersistentSubscriptionToAllOptions
startFrom(Position position)
Starts the subscription from the given transaction log position.
-
-
-
Method Detail
-
get
public static CreatePersistentSubscriptionToAllOptions get()
Returns options with default values.
-
filter
public CreatePersistentSubscriptionToAllOptions filter(SubscriptionFilter filter)
Applies a server-side filter to determine if an event of the subscription should be yielded.
-
fromStart
public CreatePersistentSubscriptionToAllOptions fromStart()
Starts the subscription from the beginning of the $all stream.
-
fromEnd
public CreatePersistentSubscriptionToAllOptions fromEnd()
Starts the subscription from the end of the $all stream.
-
startFrom
public CreatePersistentSubscriptionToAllOptions startFrom(Position position)
Starts the subscription from the given transaction log position.- Parameters:
position
- a transaction log position.- See Also:
Position
-
startFrom
public CreatePersistentSubscriptionToAllOptions startFrom(long unsignedPrepare, long unsignedCommit)
Starts the subscription from the given transaction log position.- See Also:
Position
-
enableLinkResolution
@Deprecated public T enableLinkResolution()
Deprecated.preferresolveLinkTos()
-
disableLinkResolution
@Deprecated public T disableLinkResolution()
Deprecated.prefernotResolveLinkTos()
-
resolveLinks
@Deprecated public T resolveLinks(boolean value)
Deprecated.preferresolveLinkTos(boolean)
-
resolveLinkTos
public T resolveLinkTos(boolean value)
Whether the subscription should resolve linkTo events to their linked events. Default: false.
-
resolveLinkTos
public T resolveLinkTos()
Resolve linkTo events to their linked events.
-
notResolveLinkTos
public T notResolveLinkTos()
Don't resolve linkTo events to their linked events.
-
enableExtraStatistics
public T enableExtraStatistics()
Enable tracking of latency statistics on this subscription.
-
disableExtraStatistics
public T disableExtraStatistics()
Disable tracking of latency statistics on this subscription.
-
extraStatistics
public T extraStatistics(boolean value)
Whether to track latency statistics on this subscription. Default: false.
-
checkpointAfter
public T checkpointAfter(java.time.Duration value)
The amount of time to try to checkpoint after. Default: 2 seconds.
-
checkpointAfterInMs
public T checkpointAfterInMs(int value)
The amount of time in milliseconds to try to checkpoint after. Default: 2 seconds.
-
historyBufferSize
public T historyBufferSize(int value)
The number of events to cache when catching up. Default: 500.
-
liveBufferSize
public T liveBufferSize(int value)
The size of the buffer (in-memory) listening to live messages as they happen before paging occurs. Default: 500.
-
maxCheckpointCount
@Deprecated public T maxCheckpointCount(int value)
Deprecated.prefercheckpointUpperBound(int)
-
checkpointUpperBound
public T checkpointUpperBound(int value)
The maximum number of messages not checkpointed before forcing a checkpoint. Default: 1000.
-
minCheckpointCount
@Deprecated public T minCheckpointCount(int value)
Deprecated.prefercheckpointLowerBound(int)
-
checkpointLowerBound
public T checkpointLowerBound(int value)
The minimum number of messages to process before a checkpoint may be written. Default: 10.
-
maxSubscriberCount
public T maxSubscriberCount(int value)
The maximum number of subscribers allowed. Default: 0 (Unbounded).
-
maxRetryCount
public T maxRetryCount(int value)
The maximum number of retries (due to timeout) before a message is considered to be parked. Default: 10.
-
messageTimeout
public T messageTimeout(java.time.Duration value)
The amount of time after which to consider a message as timed out and retried. Default: 30 seconds.
-
messageTimeoutInMs
public T messageTimeoutInMs(int value)
The amount of time in milliseconds after which to consider a message as timed out and retried. Default: 30 seconds.
-
readBatchSize
public T readBatchSize(int value)
The number of events read at a time when catching up. Default: 20.
-
namedConsumerStrategy
public T namedConsumerStrategy(NamedConsumerStrategy value)
The strategy to use for distributing events to client consumers.
-
authenticated
public T authenticated(UserCredentials credentials)
Sets user credentials for the request- Parameters:
credentials
-- Returns:
- updated options
- See Also:
UserCredentials
-
authenticated
public T authenticated(java.lang.String login, java.lang.String password)
Sets user credentials for the request- Parameters:
login
-password
-- Returns:
- updated options
-
requiresLeader
public T requiresLeader()
Requires the request to be performed by the leader of the cluster.- Returns:
- updated options
-
notRequireLeader
public T notRequireLeader()
Do not require the request to be performed by the leader of the cluster.- Returns:
- updated options
-
requiresLeader
public T requiresLeader(boolean value)
If true, requires the request to be performed by the leader of the cluster.- Parameters:
value
-- Returns:
- updated options
-
deadline
public T deadline(long durationInMs)
A length of time (in milliseconds) to use for gRPC deadlines.- Parameters:
durationInMs
-- Returns:
-
-