Package io.temporal.internal.worker
Class PollerOptions.Builder
- java.lang.Object
-
- io.temporal.internal.worker.PollerOptions.Builder
-
- Enclosing class:
- PollerOptions
public static final class PollerOptions.Builder extends java.lang.Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PollerOptionsbuild()PollerOptions.BuildersetMaximumPollRateIntervalMilliseconds(int maximumPollRateIntervalMilliseconds)Defines interval for measuring poll rate.PollerOptions.BuildersetMaximumPollRatePerSecond(double maximumPollRatePerSecond)Maximum rate of polling.PollerOptions.BuildersetPollBackoffCoefficient(double pollBackoffCoefficient)Coefficient to use when calculating exponential delay in case of failuresPollerOptions.BuildersetPollBackoffInitialInterval(java.time.Duration pollBackoffInitialInterval)Initial delay in case of failure.PollerOptions.BuildersetPollBackoffMaximumInterval(java.time.Duration pollBackoffMaximumInterval)Maximum interval between polls in case of failures.PollerOptions.BuildersetPollThreadCount(int pollThreadCount)Number of parallel polling threads.PollerOptions.BuildersetPollThreadNamePrefix(java.lang.String pollThreadNamePrefix)Prefix to use when naming poller threads.PollerOptions.BuildersetUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)Called to report unexpected exceptions in the poller threads.
-
-
-
Method Detail
-
setMaximumPollRateIntervalMilliseconds
public PollerOptions.Builder setMaximumPollRateIntervalMilliseconds(int maximumPollRateIntervalMilliseconds)
Defines interval for measuring poll rate. Larger the interval more spiky can be the load.
-
setMaximumPollRatePerSecond
public PollerOptions.Builder setMaximumPollRatePerSecond(double maximumPollRatePerSecond)
Maximum rate of polling. Measured in the interval set throughsetMaximumPollRateIntervalMilliseconds(int).
-
setPollBackoffCoefficient
public PollerOptions.Builder setPollBackoffCoefficient(double pollBackoffCoefficient)
Coefficient to use when calculating exponential delay in case of failures
-
setPollBackoffInitialInterval
public PollerOptions.Builder setPollBackoffInitialInterval(java.time.Duration pollBackoffInitialInterval)
Initial delay in case of failure. If backoff coefficient is 1 then it would be the constant delay between failing polls.
-
setPollBackoffMaximumInterval
public PollerOptions.Builder setPollBackoffMaximumInterval(java.time.Duration pollBackoffMaximumInterval)
Maximum interval between polls in case of failures.
-
setPollThreadCount
public PollerOptions.Builder setPollThreadCount(int pollThreadCount)
Number of parallel polling threads.
-
setUncaughtExceptionHandler
public PollerOptions.Builder setUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler uncaughtExceptionHandler)
Called to report unexpected exceptions in the poller threads.
-
setPollThreadNamePrefix
public PollerOptions.Builder setPollThreadNamePrefix(java.lang.String pollThreadNamePrefix)
Prefix to use when naming poller threads.
-
build
public PollerOptions build()
-
-