Class ExponentialWaitStrategy
- java.lang.Object
-
- org.apache.flink.client.program.rest.retry.ExponentialWaitStrategy
-
- All Implemented Interfaces:
WaitStrategy
public class ExponentialWaitStrategy extends Object implements WaitStrategy
WaitStrategywith exponentially increasing sleep time.
-
-
Constructor Summary
Constructors Constructor Description ExponentialWaitStrategy(long initialWait, long maxWait)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longsleepTime(long attempt)Returns the time to wait until the next attempt.
-
-
-
Method Detail
-
sleepTime
public long sleepTime(long attempt)
Description copied from interface:WaitStrategyReturns the time to wait until the next attempt. Attempts start at0.- Specified by:
sleepTimein interfaceWaitStrategy- Parameters:
attempt- The number of the last attempt.- Returns:
- Waiting time in ms.
-
-