public class PollableOptions extends Object implements Serializable, Copyable<PollableOptions>
Modifier and Type | Class and Description |
---|---|
static class |
PollableOptions.ConstantPollStrategy
This represents the
PollableOptions.PollStrategyType.CONSTANT polling strategy. |
static class |
PollableOptions.ExponentialPollStrategy
This represents the
PollableOptions.PollStrategyType.EXPONENTIAL polling strategy
with back-off and jitter. |
static class |
PollableOptions.LinearPollStrategy
This represents the
PollableOptions.PollStrategyType.LINEAR polling strategy. |
static class |
PollableOptions.PollStrategy<S extends PollableOptions.PollStrategy<S>>
Abstract class representing the base polling strategy and its type.
|
static class |
PollableOptions.PollStrategyType
Represents the type of strategy used to when calculating the interval at which to poll.
|
Constructor and Description |
---|
PollableOptions() |
PollableOptions(PollableOptions pollableOptions) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
PollableOptions |
constantStrategy(int interval)
Creates a constant polling strategy.
|
PollableOptions |
copy() |
boolean |
equals(Object o) |
PollableOptions |
errorLimit(int errorLimit) |
PollableOptions |
exponentialStrategy(int interval,
int min,
int max)
Creates an exponential polling strategy.
|
int |
getErrorLimit()
This represents the number of polling failures permitted before stopping.
|
int |
getLimit()
This represents the number of poll requests permitted before stopping.
|
PollableOptions.PollStrategy<?> |
getStrategy()
This represents the strategy used for calculating the interval between each poll request.
|
int |
hashCode() |
PollableOptions |
limit(int limit) |
PollableOptions |
linearStrategy(int start,
int increment)
Creates a linear polling strategy.
|
PollableOptions |
strategy(PollableOptions.PollStrategy<?> strategy) |
public PollableOptions()
public PollableOptions(PollableOptions pollableOptions)
public PollableOptions copy()
copy
in interface Copyable<PollableOptions>
public PollableOptions errorLimit(int errorLimit)
public PollableOptions limit(int limit)
public PollableOptions strategy(PollableOptions.PollStrategy<?> strategy)
public PollableOptions constantStrategy(int interval)
interval
- the constant interval at which to pollpublic PollableOptions linearStrategy(int start, int increment)
start
- the base interval at which to pollincrement
- the increment at which the starting interval is increased each pollpublic PollableOptions exponentialStrategy(int interval, int min, int max)
interval
- the base intervalmin
- the minimum interval at which to pollmax
- the minimum interval at which to pollpublic int getErrorLimit()
public int getLimit()
public PollableOptions.PollStrategy<?> getStrategy()
protected boolean canEqual(Object other)
Copyright © 2021. All rights reserved.