V
- the type of value returned by the futureF
- the type of futurepublic class PromiseNotifier<V,F extends Future<V>> extends java.lang.Object implements GenericFutureListener<F>
GenericFutureListener
implementation which takes other Promise
s
and notifies them on completion.构造器和说明 |
---|
PromiseNotifier(boolean logNotifyFailure,
Promise<? super V>... promises)
Create a new instance.
|
PromiseNotifier(Promise<? super V>... promises)
Create a new instance.
|
限定符和类型 | 方法和说明 |
---|---|
static <V,F extends Future<V>> |
cascade(boolean logNotifyFailure,
F future,
Promise<? super V> promise)
|
static <V,F extends Future<V>> |
cascade(F future,
Promise<? super V> promise)
|
void |
operationComplete(F future)
Invoked when the operation associated with the
Future has been completed. |
@SafeVarargs public PromiseNotifier(Promise<? super V>... promises)
promises
- the Promise
s to notify once this GenericFutureListener
is notified.@SafeVarargs public PromiseNotifier(boolean logNotifyFailure, Promise<? super V>... promises)
logNotifyFailure
- true
if logging should be done in case notification fails.promises
- the Promise
s to notify once this GenericFutureListener
is notified.public static <V,F extends Future<V>> F cascade(boolean logNotifyFailure, F future, Promise<? super V> promise)
public void operationComplete(F future) throws java.lang.Exception
GenericFutureListener
Future
has been completed.operationComplete
在接口中 GenericFutureListener<F extends Future<V>>
future
- the source Future
which called this callbackjava.lang.Exception