Class ExponentialWaitStrategy
java.lang.Object
org.apache.flink.client.program.rest.retry.ExponentialWaitStrategy
- All Implemented Interfaces:
WaitStrategy
WaitStrategy with exponentially increasing sleep time.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongsleepTime(long attempt) Returns the time to wait until the next attempt.
-
Constructor Details
-
ExponentialWaitStrategy
public ExponentialWaitStrategy(long initialWait, long maxWait)
-
-
Method Details
-
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.
-