Package com.mindee.v2.clientoptions
Class PollingOptions
- java.lang.Object
-
- com.mindee.clientoptions.BasePollingOptions
-
- com.mindee.v2.clientoptions.PollingOptions
-
public class PollingOptions extends BasePollingOptions
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPollingOptions.PollingOptionsBuilder
-
Constructor Summary
Constructors Constructor Description PollingOptions(Double initialDelaySec, Double intervalSec, Integer maxRetries, Double backoffMultiplier, Double maxIntervalSec, BooleanSupplier cancelToken)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PollingOptions.PollingOptionsBuilderbuilder()DoublegetBackoffMultiplier()Multiplier applied tointervalSecafter each poll attempt to implement exponential backoff.BooleanSuppliergetCancelToken()Optional cancellation signal.DoublegetMaxIntervalSec()Upper bound (in seconds) for the polling interval after backoff is applied.-
Methods inherited from class com.mindee.clientoptions.BasePollingOptions
getInitialDelaySec, getIntervalSec, getMaxRetries
-
-
-
-
Method Detail
-
builder
public static PollingOptions.PollingOptionsBuilder builder()
-
getBackoffMultiplier
public Double getBackoffMultiplier()
Multiplier applied tointervalSecafter each poll attempt to implement exponential backoff. Must be ≥ 1.0. A value of 1.0 disables backoff.
-
getMaxIntervalSec
public Double getMaxIntervalSec()
Upper bound (in seconds) for the polling interval after backoff is applied. Must be ≥intervalSec.
-
getCancelToken
public BooleanSupplier getCancelToken()
Optional cancellation signal. When it evaluates totrue, polling is aborted with aCancellationException. Also, interrupting the polling thread cancels the operation.
-
-