Package com.eventstore.dbclient
Class PersistentSubscriptionSettings
- java.lang.Object
-
- com.eventstore.dbclient.PersistentSubscriptionSettings
-
- Direct Known Subclasses:
PersistentSubscriptionToAllSettings,PersistentSubscriptionToStreamSettings
public abstract class PersistentSubscriptionSettings extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description PersistentSubscriptionSettings()PersistentSubscriptionSettings(int checkpointAfter, boolean extraStatistics, boolean resolveLinks, int historyBufferSize, int liveBufferSize, int checkpointUpperBound, int maxRetryCount, int maxSubscriberCount, int messageTimeoutMs, int minCheckpointCount, int readBatchSize, java.lang.String consumerStrategyName)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static PersistentSubscriptionToStreamSettingsdefaultRegular()static PersistentSubscriptionToAllSettingsdefaultToAll()java.time.DurationgetCheckpointAfter()The amount of time to try to checkpoint after.intgetCheckpointAfterInMs()The amount of time in milliseconds to try to checkpoint after.intgetCheckpointLowerBound()The minimum number of messages to process before a checkpoint may be written.intgetCheckpointUpperBound()The maximum number of messages not checkpointed before forcing a checkpoint.java.lang.StringgetConsumerStrategyName()The strategy to use for distributing events to client consumers.intgetHistoryBufferSize()The number of events to cache when catching up.intgetLiveBufferSize()The size of the buffer (in-memory) listening to live messages as they happen before paging occurs.longgetMaxCheckpointCount()Deprecated.prefergetCheckpointUpperBound()intgetMaxRetryCount()The maximum number of retries (due to timeout) before a message is considered to be parked.intgetMaxSubscriberCount()The maximum number of subscribers allowed.java.time.DurationgetMessageTimeout()The amount of time after which to consider a message as timed out and retried.intgetMessageTimeoutMs()The amount of time in milliseconds after which to consider a message as timed out and retried.longgetMinCheckpointCount()Deprecated.prefergetCheckpointLowerBound()intgetReadBatchSize()The number of events read at a time when catching up.ConsumerStrategygetStrategy()Deprecated.prefergetConsumerStrategyName()booleanisExtraStatistics()Whether to track latency statistics on this subscription.booleanisResolveLinks()Deprecated.prefershouldResolveLinkTos()booleanisResolveLinkTos()voidsetCheckpointAfter(int checkpointAfter)voidsetCheckpointLowerBound(int checkpointLowerBound)voidsetCheckpointUpperBound(int checkpointUpperBound)voidsetConsumerStrategyName(java.lang.String consumerStrategyName)voidsetExtraStatistics(boolean extraStatistics)voidsetHistoryBufferSize(int historyBufferSize)voidsetLiveBufferSize(int liveBufferSize)voidsetMaxRetryCount(int maxRetryCount)voidsetMaxSubscriberCount(int maxSubscriberCount)voidsetMessageTimeoutMs(int messageTimeoutMs)voidsetReadBatchSize(int readBatchSize)voidsetResolveLinkTos(boolean resolveLinkTos)booleanshouldResolveLinkTos()Whether the subscription should resolve linkTo events to their linked events.
-
-
-
Constructor Detail
-
PersistentSubscriptionSettings
public PersistentSubscriptionSettings()
-
PersistentSubscriptionSettings
public PersistentSubscriptionSettings(int checkpointAfter, boolean extraStatistics, boolean resolveLinks, int historyBufferSize, int liveBufferSize, int checkpointUpperBound, int maxRetryCount, int maxSubscriberCount, int messageTimeoutMs, int minCheckpointCount, int readBatchSize, java.lang.String consumerStrategyName)
-
-
Method Detail
-
defaultRegular
public static PersistentSubscriptionToStreamSettings defaultRegular()
-
defaultToAll
public static PersistentSubscriptionToAllSettings defaultToAll()
-
getCheckpointAfterInMs
public int getCheckpointAfterInMs()
The amount of time in milliseconds to try to checkpoint after.
-
getCheckpointAfter
public java.time.Duration getCheckpointAfter()
The amount of time to try to checkpoint after.
-
isExtraStatistics
public boolean isExtraStatistics()
Whether to track latency statistics on this subscription.
-
isResolveLinks
public boolean isResolveLinks()
Deprecated.prefershouldResolveLinkTos()
-
shouldResolveLinkTos
public boolean shouldResolveLinkTos()
Whether the subscription should resolve linkTo events to their linked events.
-
getHistoryBufferSize
public int getHistoryBufferSize()
The number of events to cache when catching up. Default 500.
-
getLiveBufferSize
public int getLiveBufferSize()
The size of the buffer (in-memory) listening to live messages as they happen before paging occurs. Default 500.
-
getMaxCheckpointCount
@Deprecated public long getMaxCheckpointCount()
Deprecated.prefergetCheckpointUpperBound()
-
getCheckpointUpperBound
public int getCheckpointUpperBound()
The maximum number of messages not checkpointed before forcing a checkpoint.
-
getMaxRetryCount
public int getMaxRetryCount()
The maximum number of retries (due to timeout) before a message is considered to be parked.
-
getMaxSubscriberCount
public int getMaxSubscriberCount()
The maximum number of subscribers allowed.
-
getMessageTimeout
public java.time.Duration getMessageTimeout()
The amount of time after which to consider a message as timed out and retried.
-
getMessageTimeoutMs
public int getMessageTimeoutMs()
The amount of time in milliseconds after which to consider a message as timed out and retried.
-
getMinCheckpointCount
@Deprecated public long getMinCheckpointCount()
Deprecated.prefergetCheckpointLowerBound()
-
getCheckpointLowerBound
public int getCheckpointLowerBound()
The minimum number of messages to process before a checkpoint may be written.
-
getReadBatchSize
public int getReadBatchSize()
The number of events read at a time when catching up.
-
getStrategy
@Deprecated public ConsumerStrategy getStrategy() throws java.lang.Exception
Deprecated.prefergetConsumerStrategyName()- Throws:
java.lang.Exception
-
getConsumerStrategyName
public java.lang.String getConsumerStrategyName()
The strategy to use for distributing events to client consumers.
-
setCheckpointAfter
public void setCheckpointAfter(int checkpointAfter)
-
setExtraStatistics
public void setExtraStatistics(boolean extraStatistics)
-
isResolveLinkTos
public boolean isResolveLinkTos()
-
setResolveLinkTos
public void setResolveLinkTos(boolean resolveLinkTos)
-
setHistoryBufferSize
public void setHistoryBufferSize(int historyBufferSize)
-
setLiveBufferSize
public void setLiveBufferSize(int liveBufferSize)
-
setCheckpointUpperBound
public void setCheckpointUpperBound(int checkpointUpperBound)
-
setMaxRetryCount
public void setMaxRetryCount(int maxRetryCount)
-
setMaxSubscriberCount
public void setMaxSubscriberCount(int maxSubscriberCount)
-
setMessageTimeoutMs
public void setMessageTimeoutMs(int messageTimeoutMs)
-
setCheckpointLowerBound
public void setCheckpointLowerBound(int checkpointLowerBound)
-
setReadBatchSize
public void setReadBatchSize(int readBatchSize)
-
setConsumerStrategyName
public void setConsumerStrategyName(java.lang.String consumerStrategyName)
-
-