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 classThis represents thePollableOptions.PollStrategyType.CONSTANTpolling strategy.static classThis represents thePollableOptions.PollStrategyType.EXPONENTIALpolling strategy with back-off and jitter.static classThis represents thePollableOptions.PollStrategyType.LINEARpolling strategy.static classAbstract class representing the base polling strategy and its type.static enumRepresents the type of strategy used to when calculating the interval at which to poll. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanconstantStrategy(int interval) Creates a constant polling strategy.copy()booleanerrorLimit(int errorLimit) exponentialStrategy(int interval, int min, int max) Creates an exponential polling strategy.intThis represents the number of polling failures permitted before stopping.intgetLimit()This represents the number of poll requests permitted before stopping.This represents the strategy used for calculating the interval between each poll request.inthashCode()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:
copyin 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()
-