Class PollableOptions
java.lang.Object
com.broadleafcommerce.metadata.dsl.core.extension.PollableOptions
- All Implemented Interfaces:
Copyable<PollableOptions>
,Serializable
- Author:
- Nick Crum (ncrum)
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
This represents thePollableOptions.PollStrategyType.CONSTANT
polling strategy.static class
This represents thePollableOptions.PollStrategyType.EXPONENTIAL
polling strategy with back-off and jitter.static class
This represents thePollableOptions.PollStrategyType.LINEAR
polling strategy.static class
Abstract class representing the base polling strategy and its type.static enum
Represents the type of strategy used to when calculating the interval at which to poll. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
constantStrategy
(int interval) Creates a constant polling strategy.copy()
boolean
errorLimit
(int errorLimit) exponentialStrategy
(int interval, int min, int max) Creates an exponential polling strategy.int
This represents the number of polling failures permitted before stopping.int
getLimit()
This represents the number of poll requests permitted before stopping.This represents the strategy used for calculating the interval between each poll request.int
hashCode()
limit
(int limit) linearStrategy
(int start, int increment) Creates a linear polling strategy.strategy
(PollableOptions.PollStrategy<?> strategy)
-
Constructor Details
-
PollableOptions
public PollableOptions() -
PollableOptions
-
-
Method Details
-
copy
- Specified by:
copy
in interfaceCopyable<PollableOptions>
- Returns:
- a deep copy of this instance
-
errorLimit
-
limit
-
strategy
-
constantStrategy
Creates a constant polling strategy.- Parameters:
interval
- the constant interval at which to poll- Returns:
- this
-
linearStrategy
Creates a linear polling strategy.- Parameters:
start
- the base interval at which to pollincrement
- the increment at which the starting interval is increased each poll- Returns:
- this
-
exponentialStrategy
Creates an exponential polling strategy.- Parameters:
interval
- the base intervalmin
- the minimum interval at which to pollmax
- the minimum interval at which to poll- Returns:
- this
-
getErrorLimit
public int getErrorLimit()This represents the number of polling failures permitted before stopping. -
getLimit
public int getLimit()This represents the number of poll requests permitted before stopping. -
getStrategy
This represents the strategy used for calculating the interval between each poll request. -
equals
-
canEqual
-
hashCode
public int hashCode()
-