T
- typeCompletionStage<T>
, Future<T>
, RFuture<T>
BatchPromise
, PromiseDelegator
, RedissonExecutorBatchFuture
, RedissonExecutorFuture
, RedissonPromise
, RedissonScheduledFuture
, RemotePromise
public interface RPromise<T> extends RFuture<T>
Modifier and Type | Method | Description |
---|---|---|
RPromise<T> |
addListener(io.netty.util.concurrent.FutureListener<? super T> listener) |
Use methods from
CompletionStage interface |
RPromise<T> |
addListeners(io.netty.util.concurrent.FutureListener<? super T>... listeners) |
Use methods from
CompletionStage interface |
RPromise<T> |
await() |
Waits for this future to be completed.
|
RPromise<T> |
awaitUninterruptibly() |
Waits for this future to be completed without
interruption.
|
boolean |
hasListeners() |
|
RPromise<T> |
removeListener(io.netty.util.concurrent.FutureListener<? super T> listener) |
|
RPromise<T> |
removeListeners(io.netty.util.concurrent.FutureListener<? super T>... listeners) |
|
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.
|
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
await, await, awaitUninterruptibly, awaitUninterruptibly, cause, getNow, isSuccess, join
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> addListener(io.netty.util.concurrent.FutureListener<? super T> listener)
RFuture
CompletionStage
interfaceaddListener
in interface RFuture<T>
listener
- - listener for future objectRPromise<T> addListeners(io.netty.util.concurrent.FutureListener<? super T>... listeners)
RFuture
CompletionStage
interfaceaddListeners
in interface RFuture<T>
listeners
- - listeners for future objectRPromise<T> removeListener(io.netty.util.concurrent.FutureListener<? super T> listener)
removeListener
in interface RFuture<T>
RPromise<T> removeListeners(io.netty.util.concurrent.FutureListener<? super T>... listeners)
removeListeners
in interface RFuture<T>
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–2018 The Redisson Project. All rights reserved.