Class TarantoolRequestRetryPolicies.InfiniteRetryPolicyFactory<T extends Predicate<Throwable>>

    • Constructor Detail

      • InfiniteRetryPolicyFactory

        public InfiniteRetryPolicyFactory​(long requestTimeout,
                                          long operationTimeout,
                                          long delay,
                                          T callback)
        Basic constructor with timeout and delay.
        Parameters:
        requestTimeout - timeout for one retry attempt, in milliseconds
        operationTimeout - timeout for the whole operation, in milliseconds
        delay - delay between retry attempts, in milliseconds
        callback - predicate checking whether the given exception may be retried
    • Method Detail

      • create

        public RequestRetryPolicy create()
        Description copied from interface: RequestRetryPolicyFactory
        Instantiate a new request retry policy instance. The policy may be either stateful or stateless, so depending on that the policy may be either instantiated as a singleton or once per request.
        Specified by:
        create in interface RequestRetryPolicyFactory
        Returns:
        new policy instance
      • getCallback

        public T getCallback()
        Getter for exception handler
        Returns:
        exception handler
      • getDelay

        public long getDelay()
        Getter for delay
        Returns:
        delay in milliseconds
      • getRequestTimeout

        public long getRequestTimeout()
        Getter for request timout
        Returns:
        request timeout in milliseconds
      • getOperationTimeout

        public long getOperationTimeout()
        Getter for operation timeout
        Returns:
        operation timeout in milliseconds