public abstract class AbstractFuture<V> extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
protected static int |
COMPLETING |
protected static int |
EXCEPTIONAL |
protected static int |
NEW |
protected static int |
NORMAL |
protected static long |
SPIN_FOR_TIMEOUT_THRESHOLD
The number of nanoseconds for which it is faster to spin
rather than to use timed park.
|
protected static Signal |
TIMEOUT |
| 构造器和说明 |
|---|
AbstractFuture() |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract void |
done(int state,
Object x) |
protected V |
get() |
protected V |
get(long timeout,
TimeUnit unit) |
boolean |
isDone() |
protected Object |
outcome()
调用这个方法之前, 需要先读
state 来保证可见性 |
protected void |
set(V v) |
protected void |
setException(Throwable t) |
protected int |
state() |
String |
toString() |
protected static final Signal TIMEOUT
protected static final long SPIN_FOR_TIMEOUT_THRESHOLD
protected static final int NEW
protected static final int COMPLETING
protected static final int NORMAL
protected static final int EXCEPTIONAL
Copyright © 2018. All rights reserved.