public class FixedDelay extends java.lang.Object implements DelayStrategy
DelayStrategy
that implements a simple fixed delay.Constructor and Description |
---|
FixedDelay(int delay)
Initialize a new
FixedDelay with fixed delay value given by delay
parameter. |
FixedDelay(int initialDelay,
int subsequentDelay)
Initialize a new
FixedDelay with a given initialDelay and
subsequentDelay . |
Modifier and Type | Method and Description |
---|---|
int |
nextDelay()
The value computed by this
DelayStrategy for the next delay. |
public FixedDelay(int initialDelay, int subsequentDelay)
FixedDelay
with a given initialDelay
and
subsequentDelay
.initialDelay
- value for the initial delaysubsequentDelay
- value for all other delayspublic FixedDelay(int delay)
FixedDelay
with fixed delay value given by delay
parameter.delay
- value for all delayspublic int nextDelay()
DelayStrategy
for the next delay.nextDelay
in interface DelayStrategy