Interface DelayStrategy
public interface DelayStrategy
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DelayStrategyWaits for 200ms, 200ms, ...static final DelayStrategyWaits for 100ms, 200ms, 400ms, 800ms, 800ms, ... -
Method Summary
-
Field Details
-
TRUNCATED_EXPONENTIAL_BACKOFF
Waits for 100ms, 200ms, 400ms, 800ms, 800ms, ... -
CONSTANT
Waits for 200ms, 200ms, ...
-
-
Method Details
-
constant
- Parameters:
delay- notnull, notDuration.isNegative()- Returns:
- constant strategy with the given interval between tries
- Throws:
IllegalArgumentException- if given delay isnullorDuration.isNegative()
-
getFirstDelay
Duration getFirstDelay() -
getNextDelay
-