T
- typepublic interface RPromise<T> extends RFuture<T>
Modifier and Type | Method and Description |
---|---|
RPromise<T> |
addListener(io.netty.util.concurrent.FutureListener<? super T> listener)
Adds the specified listener to this future.
|
RPromise<T> |
addListeners(io.netty.util.concurrent.FutureListener<? super T>... listeners)
Adds the specified listeners to this future.
|
RPromise<T> |
await()
Waits for this future to be completed.
|
RPromise<T> |
awaitUninterruptibly()
Waits for this future to be completed without
interruption.
|
RPromise<T> |
removeListener(io.netty.util.concurrent.FutureListener<? super T> listener)
Removes the first occurrence of the specified listener from this future.
|
RPromise<T> |
removeListeners(io.netty.util.concurrent.FutureListener<? super T>... listeners)
Removes the first occurrence for each of the listeners from this future.
|
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
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
addListener
in interface RFuture<T>
listener
- - listener for future objectRPromise<T> addListeners(io.netty.util.concurrent.FutureListener<? super T>... listeners)
RFuture
addListeners
in interface RFuture<T>
listeners
- - listeners for future objectRPromise<T> removeListener(io.netty.util.concurrent.FutureListener<? super T> listener)
RFuture
removeListener
in interface RFuture<T>
listener
- - listener for future objectRPromise<T> removeListeners(io.netty.util.concurrent.FutureListener<? super T>... listeners)
RFuture
removeListeners
in interface RFuture<T>
listeners
- - listeners for future objectRPromise<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 interruptedCopyright © 2014–2017 The Redisson Project. All rights reserved.