F - The type of the parameter the Function acceptsT - The type of the result the Function yields upon applicationpublic class RetryFunction<F,T> extends Object implements Function<F,T>
| Constructor and Description |
|---|
RetryFunction(Function<F,T> function,
int tries)
An instance that does nothing before retrying and ignores exceptions that
occur.
|
RetryFunction(Function<F,T> function,
int tries,
ExceptionHandler handler)
An instance that does nothing before retrying.
|
RetryFunction(Function<F,T> function,
int tries,
ExceptionHandler handler,
Runnable beforeRetry)
Constructor for RetryFunction.
|
| Modifier and Type | Method and Description |
|---|---|
T |
apply(F parameter)
Attempt to apply parameter to the wrapped Function tries
number of times.
|
public RetryFunction(Function<F,T> function, int tries)
function - which fetches the result, must not be nulltries - the numbe rof times to attempt to get a result, must be
positivepublic RetryFunction(Function<F,T> function, int tries, ExceptionHandler handler)
function - which fetches the result, must not be nulltries - the number of times to attempt to get a result, must be
positivehandler - reacts to exceptions thrown by the supplier, must not be
nullpublic RetryFunction(Function<F,T> function, int tries, ExceptionHandler handler, Runnable beforeRetry)
Constructor for RetryFunction.
function - which fetches the result, must not be nulltries - the number of times to attempt to get a result, must be
positivehandler - reacts to exceptions thrown by the supplier, must not be
nullbeforeRetry - an effect that is run before a retry attemptpublic T apply(F parameter)
Copyright © 2018 Atlassian. All rights reserved.