Package org.apache.ignite.spi
Interface TimeoutStrategy
-
- All Known Implementing Classes:
ExponentialBackoffTimeoutStrategy
public interface TimeoutStrategyStrategy to calculate next timeout and check if total timeout reached.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default booleancheckTimeout()Check if total timeout will be reached by now.booleancheckTimeout(long timeInFut)Check if total timeout will be reached in now() + timeInFut.default longnextTimeout()Get next timeout.longnextTimeout(long currTimeout)Get next timeout based on previously timeout calculated by strategy.
-
-
-
Method Detail
-
nextTimeout
long nextTimeout(long currTimeout) throws IgniteSpiOperationTimeoutExceptionGet next timeout based on previously timeout calculated by strategy.- Parameters:
currTimeout- Current timeout value that is used to calculate the next one.- Returns:
- Gets next timeout.
- Throws:
IgniteSpiOperationTimeoutException- in case of total timeout already breached.
-
nextTimeout
default long nextTimeout() throws IgniteSpiOperationTimeoutExceptionGet next timeout.- Returns:
- Get next timeout.
- Throws:
IgniteSpiOperationTimeoutException- In case of total timeout already breached.
-
checkTimeout
boolean checkTimeout(long timeInFut)
Check if total timeout will be reached in now() + timeInFut. If timeInFut is 0, will check that timeout already reached.- Parameters:
timeInFut- Some millis in future.- Returns:
Trueif total timeout will be reached.
-
checkTimeout
default boolean checkTimeout()
Check if total timeout will be reached by now.- Returns:
Trueif total timeout already reached.
-
-