Package org.redisson.misc
Interface RPromise<T>
-
- Type Parameters:
T
- type
- All Superinterfaces:
<T>
,<T>
,RFuture<T>
- All Known Implementing Classes:
BatchPromise
,PromiseDelegator
,RedissonExecutorBatchFuture
,RedissonExecutorFuture
,RedissonPromise
,RedissonScheduledFuture
,RemotePromise
public interface RPromise<T> extends RFuture<T>
- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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
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.-
Methods inherited from interface java.util.concurrent.
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
-
Methods inherited from interface org.redisson.api.RFuture
await, await, awaitUninterruptibly, awaitUninterruptibly, cause, getNow, isSuccess, join, onComplete
-
-
-
-
Method Detail
-
trySuccess
boolean trySuccess(T result)
Marks this future as a success and notifies all listeners.- Parameters:
result
- object- Returns:
true
if and only if successfully marked this future as a success. Otherwisefalse
because this future is already marked as either a success or a failure.
-
tryFailure
boolean tryFailure( cause)
Marks this future as a failure and notifies all listeners.- Parameters:
cause
- object- Returns:
true
if and only if successfully marked this future as a failure. Otherwisefalse
because this future is already marked as either a success or a failure.
-
setUncancellable
boolean setUncancellable()
Make this future impossible to cancel.- Returns:
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.
-
await
RPromise<T> await() throws
Description copied from interface:RFuture
Waits for this future to be completed.
-
awaitUninterruptibly
RPromise<T> awaitUninterruptibly()
Description copied from interface:RFuture
Waits for this future to be completed without interruption. This method catches an and discards it silently.- Specified by:
awaitUninterruptibly
in interfaceRFuture<T>
- Returns:
- Future object
-
sync
RPromise<T> sync() throws
Description copied from interface:RFuture
Waits for this future until it is done, and rethrows the cause of the failure if this future failed.
-
syncUninterruptibly
RPromise<T> syncUninterruptibly()
Description copied from interface:RFuture
Waits for this future until it is done, and rethrows the cause of the failure if this future failed.- Specified by:
syncUninterruptibly
in interfaceRFuture<T>
- Returns:
- Future object
-
hasListeners
boolean hasListeners()
-
-