Interface RetryStrategy

    • Method Detail

      • scheduleRetry

        void scheduleRetry​(java.lang.Runnable retry,
                           int totalAttempts,
                           io.netty.util.concurrent.Promise<RadiusPacket> promise)
        Schedule a retry in the future. Invoked immediately after a request is sent to schedule next retry.

        When retry is due to run, should also check if promise isDone() before running.

        Implemented here instead of RadiusClient so custom scheduling / retry backoff can be used depending on implementation, and actual retry can be deferred. Scheduling and logic should be implemented here, while RadiusClient only deals with IO.

        Parameters:
        retry - runnable to invoke to retry
        totalAttempts - current attempt count
        promise - request promise that resolves when a response is received