Class BackoffWrapper
- java.lang.Object
-
- com.linecorp.armeria.client.retry.BackoffWrapper
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
BackoffWrapper(Backoff delegate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Optional<T>
as(Class<T> backoffType)
protected Backoff
delegate()
long
nextDelayMillis(int numAttemptsSoFar)
Returns the number of milliseconds to wait for before attempting a retry.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.linecorp.armeria.client.retry.Backoff
withJitter, withJitter, withJitter, withMaxAttempts
-
-
-
-
Constructor Detail
-
BackoffWrapper
protected BackoffWrapper(Backoff delegate)
-
-
Method Detail
-
nextDelayMillis
public long nextDelayMillis(int numAttemptsSoFar)
Description copied from interface:Backoff
Returns the number of milliseconds to wait for before attempting a retry.- Specified by:
nextDelayMillis
in interfaceBackoff
- Parameters:
numAttemptsSoFar
- the number of attempts made by a client so far, including the first attempt and its following retries.- Returns:
- the number of milliseconds to wait for before attempting a retry, or a negative value if no further retry has to be made.
-
delegate
protected Backoff delegate()
-
as
public final <T> Optional<T> as(Class<T> backoffType)
Description copied from interface:Backoff
-
-