public interface RetryPolicy
|Modifier and Type||Method and Description|
Called when an operation has failed for some reason.
Called when an operation has failed with a specific exception.
boolean allowRetry(int retryCount, long elapsedTimeMs, RetrySleeper sleeper)
retryCount- the number of times retried so far (0 the first time)
elapsedTimeMs- the elapsed time in ms since the operation was attempted
sleeper- use this to sleep - DO NOT call Thread.sleep
default boolean allowRetry(Throwable exception)
exception- the cause that this operation failed
Copyright © 2011–2023 The Apache Software Foundation. All rights reserved.