T - The type of the result the Supplier yields upon applicationpublic class RetrySupplier<T> extends Object implements Supplier<T>
| Constructor and Description |
|---|
RetrySupplier(Supplier<T> supplier,
int tries)
An instance that does nothing before retrying and ignores exceptions that
occur.
|
RetrySupplier(Supplier<T> supplier,
int tries,
ExceptionHandler handler)
An instance that does nothing before retrying.
|
RetrySupplier(Supplier<T> supplier,
int tries,
ExceptionHandler handler,
Runnable beforeRetry)
Constructor for RetrySupplier.
|
public RetrySupplier(Supplier<T> supplier, int tries)
supplier - which fetches the result, must not be nulltries - the number of times to attempt to get a result, must be
positivepublic RetrySupplier(Supplier<T> supplier, int tries, ExceptionHandler handler)
supplier - 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 RetrySupplier(Supplier<T> supplier, int tries, ExceptionHandler handler, Runnable beforeRetry)
Constructor for RetrySupplier.
supplier - 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 - a task which will run at the end of anypublic T get()
Copyright © 2018 Atlassian. All rights reserved.