public static class TimerConfig.Builder extends Object
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
TimerConfig |
build() |
TimerConfig.Builder |
numBuckets(int numBuckets)
Internally, each Timer divides time into a number of buckets, which this setting controls.
|
TimerConfig.Builder |
numTimers(int numTimers)
Configures multiple parallel Timers, allowing more throughput of retries and timeouts.
|
TimerConfig.Builder |
tickDuration(Duration tickDuration)
Configures the time between each 'tick' of the Timer(s).
|
@Stability.Volatile public TimerConfig.Builder numTimers(int numTimers)
It defaults to 1.
@Stability.Volatile public TimerConfig.Builder tickDuration(Duration tickDuration)
Timeouts and retries can only fire as accurately as this resolution. If reducing the value,
users may want to increase the numBuckets(int)
setting.
It defaults to 10 milliseconds.
@Stability.Volatile public TimerConfig.Builder numBuckets(int numBuckets)
It defaults to 512.
If it's expected that many timeouts or retries will be firing, users may want to increase this setting.
public TimerConfig build()
Copyright © 2024 Couchbase, Inc.. All rights reserved.