T
- typepublic interface RPromise<T> extends RFuture<T>
Modifier and Type | Method and Description |
---|---|
RPromise<T> |
await()
Waits for this future to be completed.
|
RPromise<T> |
awaitUninterruptibly()
Waits for this future to be completed without
interruption.
|
boolean |
hasListeners() |
boolean |
setUncancellable()
Make this future impossible to cancel.
|
RPromise<T> |
sync()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
RPromise<T> |
syncUninterruptibly()
Waits for this future until it is done, and rethrows the cause of the failure if this future
failed.
|
boolean |
tryFailure(Throwable cause)
Marks this future as a failure and notifies all
listeners.
|
boolean |
trySuccess(T result)
Marks this future as a success and notifies all
listeners.
|
await, await, awaitUninterruptibly, awaitUninterruptibly, cause, getNow, isSuccess, join, onComplete
acceptEither, acceptEitherAsync, acceptEitherAsync, applyToEither, applyToEitherAsync, applyToEitherAsync, exceptionally, handle, handleAsync, handleAsync, runAfterBoth, runAfterBothAsync, runAfterBothAsync, runAfterEither, runAfterEitherAsync, runAfterEitherAsync, thenAccept, thenAcceptAsync, thenAcceptAsync, thenAcceptBoth, thenAcceptBothAsync, thenAcceptBothAsync, thenApply, thenApplyAsync, thenApplyAsync, thenCombine, thenCombineAsync, thenCombineAsync, thenCompose, thenComposeAsync, thenComposeAsync, thenRun, thenRunAsync, thenRunAsync, toCompletableFuture, whenComplete, whenCompleteAsync, whenCompleteAsync
boolean trySuccess(T result)
result
- objecttrue
if and only if successfully marked this future as
a success. Otherwise false
because this future is
already marked as either a success or a failure.boolean tryFailure(Throwable cause)
cause
- objecttrue
if and only if successfully marked this future as
a failure. Otherwise false
because this future is
already marked as either a success or a failure.boolean setUncancellable()
true
if and only if successfully marked this future as uncancellable or it is already done
without being cancelled. false
if this future has been cancelled already.RPromise<T> await() throws InterruptedException
RFuture
await
in interface RFuture<T>
InterruptedException
- if the current thread was interruptedRPromise<T> awaitUninterruptibly()
RFuture
InterruptedException
and
discards it silently.awaitUninterruptibly
in interface RFuture<T>
RPromise<T> sync() throws InterruptedException
RFuture
sync
in interface RFuture<T>
InterruptedException
- if the current thread was interruptedRPromise<T> syncUninterruptibly()
RFuture
syncUninterruptibly
in interface RFuture<T>
boolean hasListeners()
Copyright © 2014–2020 Redisson. All rights reserved.