WaitResultBuilder<T>, WaitResultBuilder1<T>, WaitResultBuilder2<T>, WaitResultBuilder3<T>, WaitResultBuilder4<T>, WaitResultBuilder5<T>, Callable<Optional<T>>, Supplier<Optional<T>>public final class WaitResultImpl<T> extends Object implements WaitResultBuilder<T>, Supplier<Optional<T>>, Callable<Optional<T>>
| Constructor | Description |
|---|---|
WaitResultImpl(Callable<T> action) |
| Modifier and Type | Method | Description |
|---|---|---|
CompletableFuture<Optional<T>> |
asyncExec(Executor executor) |
Create and start the async execution of the
CompletableFuture. |
Optional<T> |
call() |
|
WaitResultImpl<T> |
every(int value,
TimeUnit unit) |
Specify the amount of time between retry.
|
WaitResultImpl<T> |
expecting(Predicate<T> acceptingClause) |
Specify the condition that accept the result.
|
Optional<T> |
get() |
|
WaitResultImpl<T> |
ignoreException(boolean alsoDontFailWhenNoResultAndException) |
Ignore any error during execution of the callable and define if there are not
result and an exception at last operation if this exception must be thrown.
|
WaitResultImpl<T> |
repeat(int count) |
Specify the maximal number of retry.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitignoreExceptionrepeatOnlyOnceasyncExec, finish, finishWithAResultpublic WaitResultImpl<T> ignoreException(boolean alsoDontFailWhenNoResultAndException)
WaitResultBuilder1ignoreException in interface WaitResultBuilder1<T>alsoDontFailWhenNoResultAndException - true if the last exception must also be ignoredthe next step of the builderpublic WaitResultImpl<T> expecting(Predicate<T> acceptingClause)
WaitResultBuilder2expecting in interface WaitResultBuilder2<T>acceptingClause - the Predicate to validate the resultthe next step of the builderpublic WaitResultImpl<T> repeat(int count)
WaitResultBuilder3repeat in interface WaitResultBuilder3<T>count - the number of retrythe next step of the builderpublic WaitResultImpl<T> every(int value, TimeUnit unit)
WaitResultBuilder4every in interface WaitResultBuilder4<T>value - the amountunit - the time unitthe last step of the builderpublic CompletableFuture<Optional<T>> asyncExec(Executor executor)
WaitResultBuilder5CompletableFuture.asyncExec in interface WaitResultBuilder5<T>executor - the executor to be used.CompletableFutureCopyright © 2019. All rights reserved.