类 AbstractFuture<V>
java.lang.Object
com.alibaba.ageiport.common.concurrent.InternalFutureFailureAccess
com.alibaba.ageiport.common.concurrent.AbstractFuture<V>
- 所有已实现的接口:
ListenableFuture<V>,Future<V>
- 直接已知子类:
FluentFuture
public abstract class AbstractFuture<V>
extends InternalFutureFailureAccess
implements ListenableFuture<V>
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddListener(Runnable listener, Executor executor) protected voidbooleancancel(boolean mayInterruptIfRunning) get()protected voidbooleanbooleanisDone()protected StringProvide a human-readable explanation of why this future has not yet completed.protected booleanprotected booleansetException(Throwable throwable) protected booleansetFuture(ListenableFuture<? extends V> future) toString()protected final Throwableprotected final boolean
-
构造器详细资料
-
AbstractFuture
protected AbstractFuture()Constructor for use by subclasses.
-
-
方法详细资料
-
get
public V get(long timeout, TimeUnit unit) throws InterruptedException, TimeoutException, ExecutionException - 指定者:
get在接口中Future<V>- 抛出:
InterruptedExceptionTimeoutExceptionExecutionException
-
get
The default
AbstractFutureimplementation throwsInterruptedExceptionif the current thread is interrupted during the call, even if the value is already available.- 指定者:
get在接口中Future<V>- 抛出:
CancellationExceptionInterruptedExceptionExecutionException
-
isDone
public boolean isDone() -
isCancelled
public boolean isCancelled()- 指定者:
isCancelled在接口中Future<V>
-
cancel
public boolean cancel(boolean mayInterruptIfRunning) -
interruptTask
protected void interruptTask() -
wasInterrupted
protected final boolean wasInterrupted() -
addListener
- 指定者:
addListener在接口中ListenableFuture<V>- 从以下版本开始:
- 10.0
-
set
-
setException
-
setFuture
-
afterDone
protected void afterDone() -
tryInternalFastPathGetFailure
-
toString
-
pendingToString
Provide a human-readable explanation of why this future has not yet completed.- 返回:
- null if an explanation cannot be provided (e.g. because the future is done).
- 从以下版本开始:
- 23.0
-