FutureStubpublic class FutureStub extends Object implements Future
Fields Summary |
---|
T | object | CountDownLatch | latch | boolean | wait |
Constructors Summary |
---|
public FutureStub(T returnObject, CountDownLatch latch)
this(returnObject,latch,false);
| public FutureStub(T returnObject, CountDownLatch latch, boolean wait)
super();
this.object = returnObject;
this.latch =latch;
this.wait =wait;
| public FutureStub(T returnObject)
this(returnObject,null);
|
Methods Summary |
---|
public boolean | cancel(boolean arg0)
return false;
| private void | doLatch()
if(latch != null){
if(!wait)
this.latch.countDown();
else
this.latch.await(5000,TimeUnit.MILLISECONDS);
}
| public T | get()
doLatch();
return this.object;
| public T | get(long arg0, java.util.concurrent.TimeUnit arg1)
doLatch();
return this.object;
| public boolean | isCancelled()
return false;
| public boolean | isDone()
return true;
|
|