Class PollingOptions.Builder
- java.lang.Object
-
- ai.extend.wrapper.utilities.polling.PollingOptions.Builder
-
- Enclosing class:
- PollingOptions
public static class PollingOptions.Builder extends java.lang.ObjectBuilder forPollingOptions.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PollingOptions.BuilderbackoffMultiplier(double backoffMultiplier)Sets the multiplier for exponential backoff during the backoff phase.PollingOptionsbuild()Builds thePollingOptionsinstance.PollingOptions.BuilderfastPollDurationMs(int fastPollDurationMs)Sets the duration of the fast polling phase in milliseconds.PollingOptions.BuilderfastPollIntervalMs(int fastPollIntervalMs)Sets the interval between polls during the fast polling phase in milliseconds.PollingOptions.BuilderinitialDelayMs(int initialDelayMs)Sets the initial delay for the backoff phase in milliseconds.PollingOptions.BuilderjitterFraction(double jitterFraction)Sets the jitter fraction for delay randomization.PollingOptions.BuildermaxDelayMs(int maxDelayMs)Sets the maximum delay between polls in milliseconds.PollingOptions.BuildermaxWaitMs(int maxWaitMs)Sets the maximum total wait time in milliseconds.PollingOptions.BuilderrequestOptions(RequestOptions requestOptions)Sets the request options to pass to API calls.
-
-
-
Method Detail
-
maxWaitMs
public PollingOptions.Builder maxWaitMs(int maxWaitMs)
Sets the maximum total wait time in milliseconds. Default: null (polls indefinitely)
-
fastPollDurationMs
public PollingOptions.Builder fastPollDurationMs(int fastPollDurationMs)
Sets the duration of the fast polling phase in milliseconds. During this phase, polls occur at a fixed interval (fastPollIntervalMs). Default: 30000 (30 seconds)
-
fastPollIntervalMs
public PollingOptions.Builder fastPollIntervalMs(int fastPollIntervalMs)
Sets the interval between polls during the fast polling phase in milliseconds. Default: 1000 (1 second)
-
initialDelayMs
public PollingOptions.Builder initialDelayMs(int initialDelayMs)
Sets the initial delay for the backoff phase in milliseconds. Default: 1000 (1 second)
-
maxDelayMs
public PollingOptions.Builder maxDelayMs(int maxDelayMs)
Sets the maximum delay between polls in milliseconds. Default: 30000 (30 seconds)
-
backoffMultiplier
public PollingOptions.Builder backoffMultiplier(double backoffMultiplier)
Sets the multiplier for exponential backoff during the backoff phase. A value of 1.15 means each delay is 1.15x the previous delay. Default: 1.15
-
jitterFraction
public PollingOptions.Builder jitterFraction(double jitterFraction)
Sets the jitter fraction for delay randomization. A value of 0.25 means delays will be randomized by ±25%. Default: 0.25
-
requestOptions
public PollingOptions.Builder requestOptions(RequestOptions requestOptions)
Sets the request options to pass to API calls.
-
build
public PollingOptions build()
Builds thePollingOptionsinstance.
-
-