Class JmcFuture<T>
java.lang.Object
org.mpi_sws.jmc.api.util.concurrent.JmcFuture<T>
- Type Parameters:
T- The return type of the callable function.
- All Implemented Interfaces:
Runnable,Future<T>,RunnableFuture<T>
A future that runs a callable function in a new thread.
-
Nested Class Summary
Nested classes/interfaces inherited from interface java.util.concurrent.Future
Future.State -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.concurrent.Future
exceptionNow, resultNow, state
-
Constructor Details
-
JmcFuture
-
JmcFuture
-
JmcFuture
-
JmcFuture
-
JmcFuture
-
-
Method Details
-
getTaskId
-
cancel
public boolean cancel(boolean b) Cancel the future.Currently unsupported by Jmc. Cannot stop tasks yet.
-
isCancelled
public boolean isCancelled()- Specified by:
isCancelledin interfaceFuture<T>
-
isDone
public boolean isDone() -
get
- Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionException
-
get
public T get(long l, TimeUnit timeUnit) throws InterruptedException, ExecutionException, TimeoutException - Specified by:
getin interfaceFuture<T>- Throws:
InterruptedExceptionExecutionExceptionTimeoutException
-
run
public void run()Run the underlying callable function in a new thread.- Specified by:
runin interfaceRunnable- Specified by:
runin interfaceRunnableFuture<T>
-