public class Promise<T> extends Object implements IPromise<T>
| Modifier and Type | Field and Description |
|---|---|
CountDownLatch |
latch |
AtomicReference |
ref |
| Constructor and Description |
|---|
Promise() |
| Modifier and Type | Method and Description |
|---|---|
void |
deliver(Object value) |
T |
deref() |
Object |
deref(long millis,
Object timeoutValue) |
T |
deref(long time,
TimeUnit unit) |
T |
deref(long time,
TimeUnit unit,
T timeoutValue) |
<T2> IPromise<T2> |
map(Fn2<T,T2> f) |
static Object |
rehydrate(Object value) |
Object |
unsafeDeref(long time,
TimeUnit unit,
Object timeoutValue) |
public final CountDownLatch latch
public final AtomicReference ref
public static Object rehydrate(Object value) throws IOException
IOExceptionpublic T deref() throws IOException
public T deref(long time, TimeUnit unit) throws IOException
deref in interface IPromise<T>IOExceptionpublic T deref(long time, TimeUnit unit, T timeoutValue) throws IOException
deref in interface IPromise<T>IOExceptionpublic Object deref(long millis, Object timeoutValue) throws IOException
deref in interface IBlockingDerefIOExceptionpublic Object unsafeDeref(long time, TimeUnit unit, Object timeoutValue) throws IOException
unsafeDeref in interface IPromise<T>IOExceptionCopyright © 2015. All rights reserved.