public class RetryableUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
RetryableUtils.RetryableSupplier<R>
Functional interface for using in the retry(int, long, RetryableSupplier).
|
static interface |
RetryableUtils.RetryableWorker
Functional interface for using retry(int, long, RetryableWorker).
|
| Constructor and Description |
|---|
RetryableUtils() |
| Modifier and Type | Method and Description |
|---|---|
<R> R |
retry(int count,
long delayInMs,
RetryableUtils.RetryableSupplier<R> supplier)
Retry mechanism for handler in the 'supplier' argument.
|
void |
retry(int count,
long delayInMs,
RetryableUtils.RetryableWorker worker)
Retry mechanism for handler in the 'worker' argument.
|
public <R> R retry(int count,
long delayInMs,
RetryableUtils.RetryableSupplier<R> supplier)
throws jakarta.mail.MessagingException
R - count - max number of the attemptsdelayInMs - delay in milliseconds between attemptssupplier - handler function implements the RetryableUtils.RetryableSupplier interfacejakarta.mail.MessagingException - error while 'supplier' is executingpublic void retry(int count,
long delayInMs,
RetryableUtils.RetryableWorker worker)
throws jakarta.mail.MessagingException
count - max number of the attemptsdelayInMs - delay in milliseconds between attemptsworker - handler function implements the RetryableUtils.RetryableWorker interfacejakarta.mail.MessagingException - error while 'worker' is executingCopyright © 2023. All rights reserved.