play.libs
类 F.Promise<V>

java.lang.Object
  继承者 play.libs.F.Promise<V>
所有已实现的接口:
java.util.concurrent.Future<V>, F.Action<V>
直接已知子类:
F.Timeout
包容类:
F

public static class F.Promise<V>
extends java.lang.Object
implements java.util.concurrent.Future<V>, F.Action<V>


构造方法摘要
F.Promise()
           
 
方法摘要
 boolean cancel(boolean mayInterruptIfRunning)
           
 V get()
           
 V get(long timeout, java.util.concurrent.TimeUnit unit)
           
 V getOrNull()
           
 void invoke(V result)
           
 void invokeWithException(java.lang.Throwable t)
           
protected  void invokeWithResultOrException(V result, java.lang.Throwable t)
           
 boolean isCancelled()
           
 boolean isDone()
           
 void onRedeem(F.Action<F.Promise<V>> callback)
           
static
<A,B> F.Promise<F.Tuple<A,B>>
wait2(F.Promise<A> tA, F.Promise<B> tB)
           
static
<A,B,C> F.Promise<F.T3<A,B,C>>
wait3(F.Promise<A> tA, F.Promise<B> tB, F.Promise<C> tC)
           
static
<A,B,C,D> F.Promise<F.T4<A,B,C,D>>
wait4(F.Promise<A> tA, F.Promise<B> tB, F.Promise<C> tC, F.Promise<D> tD)
           
static
<A,B,C,D,E>
F.Promise<F.T5<A,B,C,D,E>>
wait5(F.Promise<A> tA, F.Promise<B> tB, F.Promise<C> tC, F.Promise<D> tD, F.Promise<E> tE)
           
static
<T> F.Promise<java.util.List<T>>
waitAll(java.util.Collection<F.Promise<T>> promises)
           
static
<T> F.Promise<java.util.List<T>>
waitAll(F.Promise<T>... promises)
           
static
<T> F.Promise<T>
waitAny(F.Promise<T>... futures)
           
static
<A,B> F.Promise<F.Either<A,B>>
waitEither(F.Promise<A> tA, F.Promise<B> tB)
           
static
<A,B,C> F.Promise<F.E3<A,B,C>>
waitEither(F.Promise<A> tA, F.Promise<B> tB, F.Promise<C> tC)
           
static
<A,B,C,D> F.Promise<F.E4<A,B,C,D>>
waitEither(F.Promise<A> tA, F.Promise<B> tB, F.Promise<C> tC, F.Promise<D> tD)
           
static
<A,B,C,D,E>
F.Promise<F.E5<A,B,C,D,E>>
waitEither(F.Promise<A> tA, F.Promise<B> tB, F.Promise<C> tC, F.Promise<D> tD, F.Promise<E> tE)
           
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

F.Promise

public F.Promise()
方法详细信息

cancel

public boolean cancel(boolean mayInterruptIfRunning)
指定者:
接口 java.util.concurrent.Future<V> 中的 cancel

isCancelled

public boolean isCancelled()
指定者:
接口 java.util.concurrent.Future<V> 中的 isCancelled

isDone

public boolean isDone()
指定者:
接口 java.util.concurrent.Future<V> 中的 isDone

getOrNull

public V getOrNull()

get

public V get()
      throws java.lang.InterruptedException,
             java.util.concurrent.ExecutionException
指定者:
接口 java.util.concurrent.Future<V> 中的 get
抛出:
java.lang.InterruptedException
java.util.concurrent.ExecutionException

get

public V get(long timeout,
             java.util.concurrent.TimeUnit unit)
      throws java.lang.InterruptedException,
             java.util.concurrent.ExecutionException,
             java.util.concurrent.TimeoutException
指定者:
接口 java.util.concurrent.Future<V> 中的 get
抛出:
java.lang.InterruptedException
java.util.concurrent.ExecutionException
java.util.concurrent.TimeoutException

invoke

public void invoke(V result)
指定者:
接口 F.Action<V> 中的 invoke

invokeWithException

public void invokeWithException(java.lang.Throwable t)

invokeWithResultOrException

protected void invokeWithResultOrException(V result,
                                           java.lang.Throwable t)

onRedeem

public void onRedeem(F.Action<F.Promise<V>> callback)

waitAll

public static <T> F.Promise<java.util.List<T>> waitAll(F.Promise<T>... promises)

waitAll

public static <T> F.Promise<java.util.List<T>> waitAll(java.util.Collection<F.Promise<T>> promises)

wait2

public static <A,B> F.Promise<F.Tuple<A,B>> wait2(F.Promise<A> tA,
                                                  F.Promise<B> tB)

wait3

public static <A,B,C> F.Promise<F.T3<A,B,C>> wait3(F.Promise<A> tA,
                                                   F.Promise<B> tB,
                                                   F.Promise<C> tC)

wait4

public static <A,B,C,D> F.Promise<F.T4<A,B,C,D>> wait4(F.Promise<A> tA,
                                                       F.Promise<B> tB,
                                                       F.Promise<C> tC,
                                                       F.Promise<D> tD)

wait5

public static <A,B,C,D,E> F.Promise<F.T5<A,B,C,D,E>> wait5(F.Promise<A> tA,
                                                           F.Promise<B> tB,
                                                           F.Promise<C> tC,
                                                           F.Promise<D> tD,
                                                           F.Promise<E> tE)

waitEither

public static <A,B> F.Promise<F.Either<A,B>> waitEither(F.Promise<A> tA,
                                                        F.Promise<B> tB)

waitEither

public static <A,B,C> F.Promise<F.E3<A,B,C>> waitEither(F.Promise<A> tA,
                                                        F.Promise<B> tB,
                                                        F.Promise<C> tC)

waitEither

public static <A,B,C,D> F.Promise<F.E4<A,B,C,D>> waitEither(F.Promise<A> tA,
                                                            F.Promise<B> tB,
                                                            F.Promise<C> tC,
                                                            F.Promise<D> tD)

waitEither

public static <A,B,C,D,E> F.Promise<F.E5<A,B,C,D,E>> waitEither(F.Promise<A> tA,
                                                                F.Promise<B> tB,
                                                                F.Promise<C> tC,
                                                                F.Promise<D> tD,
                                                                F.Promise<E> tE)

waitAny

public static <T> F.Promise<T> waitAny(F.Promise<T>... futures)


Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly