Class AbstractBackoff
java.lang.Object
com.linecorp.armeria.client.retry.AbstractBackoff
- All Implemented Interfaces:
Backoff
,Unwrappable
A skeletal
Backoff
implementation.-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected abstract long
doNextDelayMillis
(int numAttemptsSoFar) Invoked bynextDelayMillis(int)
afternumAttemptsSoFar
is validated.final long
nextDelayMillis
(int numAttemptsSoFar) Returns the number of milliseconds to wait for before attempting a retry.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.linecorp.armeria.client.retry.Backoff
as, unwrap, withJitter, withJitter, withJitter, withMaxAttempts
Methods inherited from interface com.linecorp.armeria.common.util.Unwrappable
equalsIgnoreWrapper, unwrapAll
-
Constructor Details
-
AbstractBackoff
public AbstractBackoff()
-
-
Method Details
-
nextDelayMillis
public final 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.
-
doNextDelayMillis
protected abstract long doNextDelayMillis(int numAttemptsSoFar) Invoked bynextDelayMillis(int)
afternumAttemptsSoFar
is validated.
-