Class MultipleOf
- java.lang.Object
-
- software.amazon.cloudformation.proxy.delay.Constant
-
- software.amazon.cloudformation.proxy.delay.MultipleOf
-
- All Implemented Interfaces:
Delay
- Direct Known Subclasses:
ShiftByMultipleOf
public class MultipleOf extends Constant
Provides constant fixed delay seconds which is a multiple of the delay for each attempt untilAbstractDelay.timeouthas been reached. After which it will returnDuration.ZERO
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMultipleOf.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MultipleOf.BuildermultipleOf()DurationnextDelay(int attempt)Returns the new delay amount to stabilize as defined byDurationtime.
-
-
-
Method Detail
-
multipleOf
public static MultipleOf.Builder multipleOf()
-
nextDelay
public Duration nextDelay(int attempt)
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 classConstant- Parameters:
attempt- , starts with 1- Returns:
- the next amount to wait for or
Duration.ZEROto indicate delay is complete
-
-