Class ShiftByMultipleOf
java.lang.Object
software.amazon.cloudformation.proxy.delay.Constant
software.amazon.cloudformation.proxy.delay.MultipleOf
software.amazon.cloudformation.proxy.delay.ShiftByMultipleOf
- All Implemented Interfaces:
Delay
Provides delay seconds which is a multiple of the delay shifted from previous
attempt's accrual until
AbstractDelay.timeout has been reached.
After which it will return Duration.ZERO-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionnextDelay(int attempt) Returns the new delay amount to stabilize as defined byDurationtime.static ShiftByMultipleOf.BuilderMethods inherited from class software.amazon.cloudformation.proxy.delay.MultipleOf
multipleOf
-
Method Details
-
shiftedOf
-
nextDelay
Description copied from interface:DelayReturns the new delay amount to stabilize as defined byDurationtime. This returns -1 to indicate that we are done with delays from this instance Different implementations can return different values- Specified by:
nextDelayin interfaceDelay- Overrides:
nextDelayin classMultipleOf- Parameters:
attempt- , starts with 1- Returns:
- the next amount to wait for or
Duration.ZEROto indicate delay is complete
-