Retry Class
- java.
lang. Object - com.
microsoft. bot. connector. authentication. Retry
- com.
public final class Retry
Will retry a call for a configurable number of times with backoff.
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| static java.util.concurrent.CompletableFuture<TResult> |
<TResult>run(Supplier<CompletableFuture<TResult>> task, BiFunction<RuntimeException,Integer,RetryParams> retryExceptionHandler)
Runs a task with retry. |
Methods inherited from java.lang.Object
java.lang.Object.clone
java.lang.Object.equals
java.lang.Object.finalize
java.lang.Object.getClass
java.lang.Object.hashCode
java.lang.Object.notify
java.lang.Object.notifyAll
java.lang.Object.toString
java.lang.Object.wait
java.lang.Object.wait
java.lang.Object.wait
Method Details
<TResult>run
public static CompletableFuture
Runs a task with retry.
Parameters:
task
- The task to run.
retryExceptionHandler
- Called when an exception happens.
Returns:
A CompletableFuture that is complete when 'task' returns
successfully.