de.intarsys.tools.concurrent
Class AbstractFutureTask<R>
java.lang.Object
de.intarsys.tools.concurrent.AbstractFutureTask<R>
- Type Parameters:
R
-
- All Implemented Interfaces:
- Runnable, Future
- Direct Known Subclasses:
- CallbackFutureTask, TaskSequence, TaskStep
public abstract class AbstractFutureTask<R>
- extends Object
- implements Runnable, Future
This is an alternate implementation for FutureTask
, which is in some
cases not flexible enough.
cancel
public boolean cancel(boolean interrupt)
- Specified by:
cancel
in interface Future
get
public R get()
throws InterruptedException,
ExecutionException
- Specified by:
get
in interface Future
- Throws:
InterruptedException
ExecutionException
get
public R get(long pMillisecTimeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
- Specified by:
get
in interface Future
- Throws:
InterruptedException
ExecutionException
TimeoutException
isCancelled
public boolean isCancelled()
- Specified by:
isCancelled
in interface Future
isDone
public boolean isDone()
- Specified by:
isDone
in interface Future
run
public final void run()
- Specified by:
run
in interface Runnable
runAsync
public void runAsync()
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2008 intarsys consulting GmbH. All Rights Reserved.