interface AsyncCompletion
(source)
A completion that will be complete at a future time.
static val COMPLETED: AsyncCompletion |
abstract fun accept(consumer: Consumer<in Throwable>): AsyncCompletion
Returns a new completion that completes successfully, after executing the given function with this completion's exception (if any). The exception supplied to the function will be |
|
open static fun allOf(vararg cs: AsyncCompletion): AsyncCompletion open static fun allOf(cs: MutableCollection<AsyncCompletion>): AsyncCompletion open static fun allOf(cs: Stream<AsyncCompletion>): AsyncCompletion
Returns an AsyncCompletion that completes when all of the given completions complete. If any completions complete exceptionally, then the resulting completion also completes exceptionally. |
|
abstract fun cancel(): Boolean
Attempt to cancel execution of this task. This attempt will fail if the task has already completed, has already been cancelled, or could not be cancelled for some other reason. If successful, and this task has not started when After this method returns, subsequent calls to |
|
open static fun completed(): AsyncCompletion
Return an already completed completion. |
|
open static fun exceptional(ex: Throwable): AsyncCompletion
Return an already failed completion, caused by the given exception. |
|
abstract fun exceptionally(consumer: Consumer<in Throwable>): AsyncCompletion
Returns a new completion that, when this result completes exceptionally, completes after executing the supplied function. Otherwise, if this result completes normally, then the returned result also completes normally with the same value. |
|
open static fun executeBlocking(action: Runnable): AsyncCompletion
Returns a completion that completes after the given blocking action executes asynchronously on open static fun executeBlocking(executor: Executor, action: Runnable): AsyncCompletion
Returns a completion that completes after the given blocking action executes asynchronously on an Executor. open static fun executeBlocking(vertx: Vertx, action: Runnable): AsyncCompletion
Returns a completion that completes after the given blocking action executes asynchronously on a vertx context. open static fun executeBlocking(executor: WorkerExecutor, action: Runnable): AsyncCompletion
Returns a completion that completes after the given blocking action executes asynchronously on a vertx executor. |
|
abstract fun <U : Any> handle(fn: Function<in Throwable, out U>): AsyncResult<U>
Returns a new result that, when this result completes either normally or exceptionally, completes with the value obtained from executing the supplied function with this result's exception (if any) as an argument. The exception supplied to the function will be |
|
open static fun incomplete(): CompletableAsyncCompletion
Return an incomplete completion, that can be later completed or failed. |
|
abstract fun isCancelled(): Boolean
Returns |
|
abstract fun isCompletedExceptionally(): Boolean
Returns |
|
abstract fun isDone(): Boolean
Returns |
|
abstract fun join(): Unit
Waits if necessary for the computation to complete. abstract fun join(timeout: Long, unit: TimeUnit): Unit
Waits if necessary for at most the given time for the computation to complete. |
|
open static fun runOnContext(vertx: Vertx, fn: Supplier<out AsyncCompletion>): AsyncCompletion
Returns a completion that, after the given function executes on a vertx context and returns a completion, completes when the completion from the function does. open static fun runOnContext(vertx: Vertx, action: Runnable): AsyncCompletion
Returns a completion that completes after the given action executes on a vertx context. Note that the given function is run directly on the context and should not block. |
|
abstract fun <U : Any> then(fn: Supplier<out AsyncResult<U>>): AsyncResult<U>
Returns a new completion that, when this completion completes normally, completes with the same value or exception as the result returned after executing the given function. |
|
abstract fun <U : Any, V : Any> thenApply(other: AsyncResult<out U>, fn: Function<in U, out V>): AsyncResult<V>
Returns a result that, when this completion and the other result both complete normally, completes with the value obtained from executing the supplied function with the value from the other result as an argument. |
|
abstract fun thenCombine(other: AsyncCompletion): AsyncCompletion
Returns a completion that completes when both this completion and the other complete normally. |
|
abstract fun thenCompose(fn: Supplier<out AsyncCompletion>): AsyncCompletion
When this result completes normally, invokes the given function with the resulting value and obtain a new AsyncCompletion. |
|
abstract fun <U : Any> thenConsume(other: AsyncResult<out U>, consumer: Consumer<in U>): AsyncCompletion
Returns a completion that, when this completion and the supplied result both complete normally, completes after executing the supplied function with the value from the supplied result as an argument. |
|
abstract fun thenRun(runnable: Runnable): AsyncCompletion
Returns a new completion that, when this completion completes normally, completes after given action is executed. |
|
abstract fun <U : Any> thenSchedule(vertx: Vertx, fn: Supplier<out AsyncResult<U>>): AsyncResult<U>
Returns a new result that, when this completion completes normally, completes with the same value or exception as the completion returned after executing the given function on the vertx context. |
|
abstract fun thenScheduleBlockingRun(vertx: Vertx, runnable: Runnable): AsyncCompletion
Returns a new completion that, when this completion completes normally, completes after the given blocking action is executed on the vertx context. abstract fun thenScheduleBlockingRun(executor: WorkerExecutor, runnable: Runnable): AsyncCompletion
Returns a new completion that, when this completion completes normally, completes after the given blocking action is executed on the vertx executor. |
|
abstract fun thenScheduleRun(vertx: Vertx, runnable: Runnable): AsyncCompletion
Returns a new completion that, when this completion completes normally, completes after the given action is executed on the vertx context. |
|
abstract fun <U : Any> thenSupply(supplier: Supplier<out U>): AsyncResult<U>
Returns a completion that, when this result completes normally, completes with the value obtained after executing the supplied function. abstract fun <U : Any> thenSupply(vertx: Vertx, supplier: Supplier<out U>): AsyncResult<U>
Returns a completion that, when this result completes normally, completes with the value obtained after executing the supplied function on the vertx context. |
|
abstract fun whenComplete(consumer: Consumer<in Throwable>): AsyncCompletion
Returns a new completion that completes in the same manner as this completion, after executing the given function with this completion's exception (if any). The exception supplied to the function will be |
interface CompletableAsyncCompletion : AsyncCompletion
An AsyncCompletion that can later be completed successfully or with a provided exception. |