public class ExponentialBackoffTimeoutStrategy extends Object implements TimeoutStrategy
Constructor and Description |
---|
ExponentialBackoffTimeoutStrategy(long totalTimeout,
long startTimeout,
long maxTimeout) |
Modifier and Type | Method and Description |
---|---|
static long |
backoffTimeout(long timeout,
long maxTimeout) |
boolean |
checkTimeout(long timeInFut)
Check if total timeout will be reached in now() + timeInFut.
|
long |
nextTimeout(long timeout)
Get next timeout based on previously timeout calculated by strategy.
|
String |
toString() |
static long |
totalBackoffTimeout(long initTimeout,
long maxTimeout,
long reconCnt)
Compute expected max backoff timeout based on initTimeout, maxTimeout and reconCnt and backoff coefficient.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
checkTimeout, nextTimeout
public ExponentialBackoffTimeoutStrategy(long totalTimeout, long startTimeout, long maxTimeout)
totalTimeout
- Total startTimeout.startTimeout
- Initial connection timeout.maxTimeout
- Max connection Timeout.public static long totalBackoffTimeout(long initTimeout, long maxTimeout, long reconCnt)
initTimeout
- Initial timeout.maxTimeout
- Max Timeout per retry.reconCnt
- Reconnection count.public static long backoffTimeout(long timeout, long maxTimeout)
timeout
- Timeout.maxTimeout
- Maximum startTimeout for backoff function.public long nextTimeout(long timeout) throws IgniteSpiOperationTimeoutException
nextTimeout
in interface TimeoutStrategy
IgniteSpiOperationTimeoutException
- in case of total timeout already breached.public boolean checkTimeout(long timeInFut)
checkTimeout
in interface TimeoutStrategy
timeInFut
- Some millis in future.True
if total timeout will be reached.
GridGain In-Memory Computing Platform : ver. 8.9.14 Release Date : November 5 2024