|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cz.cuni.amis.utils.future.FutureWrapper<RESULT>
public class FutureWrapper<RESULT>
Constructor Summary | |
---|---|
FutureWrapper(IFuture<RESULT> impl)
|
Method Summary | |
---|---|
boolean |
cancel(boolean mayInterruptIfRunning)
|
RESULT |
get()
Waits if necessary for the computation to complete, and then retrieves its result. |
RESULT |
get(long timeout,
java.util.concurrent.TimeUnit unit)
Waits if necessary for at most the given time for the computation to complete, and then retrieves its result, if available. |
boolean |
isCancelled()
|
boolean |
isDone()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FutureWrapper(IFuture<RESULT> impl)
Method Detail |
---|
public boolean cancel(boolean mayInterruptIfRunning)
cancel
in interface java.util.concurrent.Future<RESULT>
public RESULT get()
IFuture
get
in interface IFuture<RESULT>
get
in interface java.util.concurrent.Future<RESULT>
public RESULT get(long timeout, java.util.concurrent.TimeUnit unit)
IFuture
get
in interface IFuture<RESULT>
get
in interface java.util.concurrent.Future<RESULT>
timeout
- the maximum time to waitunit
- the time unit of the timeout argument
public boolean isCancelled()
isCancelled
in interface java.util.concurrent.Future<RESULT>
public boolean isDone()
isDone
in interface java.util.concurrent.Future<RESULT>
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |