org.apache.ignite.spi

## Interface TimeoutStrategy

All Known Implementing Classes:
  ExponentialBackoffTimeoutStrategy

    public interface TimeoutStrategy

Strategy to calculate next timeout and check if total timeout reached.

### Method Summary

All Methods Instance Methods Abstract Methods Default Methods
`default boolean` `checkTimeout()` Check if total timeout will be reached by now.
`boolean` `checkTimeout(long timeInFut)` Check if total timeout will be reached in now() + timeInFut.
`default long` `nextTimeout()` Get next timeout.
`long` `nextTimeout(long currTimeout)` Get next timeout based on previously timeout calculated by strategy.

### Method Detail

#### nextTimeout

    long nextTimeout(long currTimeout)
              throws IgniteSpiOperationTimeoutException

Get next timeout based on previously timeout calculated by strategy.

Returns:
  Gets next timeout.
Throws:
  `IgniteSpiOperationTimeoutException` - in case of total timeout already breached.

#### nextTimeout

    default long nextTimeout()
                      throws IgniteSpiOperationTimeoutException

Get 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:
  `True` if total timeout will be reached.

#### checkTimeout

    default boolean checkTimeout()

Check if total timeout will be reached by now.

Returns:
  `True` if total timeout already reached.

${current.year} Copyright © Apache Software Foundation

Follow @ApacheIgnite

Ignite Database and Caching Platform | : ver. 2.9.0
Release Date | : October 15 2020