Class RetryImpl.AsyncContextImpl

    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      void onComplete()
      Records a successful call or retryable call with the needed generated retry events.
      long onError​(java.lang.Throwable throwable)
      Records an failed call.
      long onResult​(T result)
      check the result call.
      void onSuccess()
      Deprecated.
      since 1.2.0
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AsyncContextImpl

        public AsyncContextImpl()
    • Method Detail

      • onError

        public long onError​(java.lang.Throwable throwable)
        Description copied from interface: Retry.AsyncContext
        Records an failed call.
        Specified by:
        onError in interface Retry.AsyncContext<T>
        Parameters:
        throwable - the exception to handle
        Returns:
        delay in milliseconds until the next try
      • onResult

        public long onResult​(T result)
        Description copied from interface: Retry.AsyncContext
        check the result call.
        Specified by:
        onResult in interface Retry.AsyncContext<T>
        Parameters:
        result - the result to validate
        Returns:
        delay in milliseconds until the next try if the result match the predicate