Class TimerConfig.Builder

Enclosing class:

public static class TimerConfig.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • numTimers

      @Volatile public TimerConfig.Builder numTimers(int numTimers)
      Configures multiple parallel Timers, allowing more throughput of retries and timeouts.

      It defaults to 1.

    • tickDuration

      @Volatile public TimerConfig.Builder tickDuration(Duration tickDuration)
      Configures the time between each 'tick' of the Timer(s).

      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.

    • numBuckets

      @Volatile public TimerConfig.Builder numBuckets(int numBuckets)
      Internally, each Timer divides time into a number of buckets, which this setting controls.

      It defaults to 512.

      If it's expected that many timeouts or retries will be firing, users may want to increase this setting.

    • build

      public TimerConfig build()