Interface TimeoutStrategy

  • All Known Implementing Classes:
    ExponentialBackoffTimeoutStrategy

    public interface TimeoutStrategy
    Strategy to calculate next timeout and check if total timeout reached.
    • Method Detail

      • nextTimeout

        long nextTimeout​(long currTimeout)
                  throws IgniteSpiOperationTimeoutException
        Get 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.
      • 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.