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
    Modifier and Type | Method and Description
    --- | ---
    `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.

2021 Copyright © Apache Software Foundation
| Follow @ApacheIgnite
Ignite Database and Caching Platform | : ver. 2.10.0
Release Date | : March 10 2021