R - public abstract class AbstractFutureTask<R>
extends java.lang.Object
implements java.lang.Runnable, java.util.concurrent.Future
FutureTask, which is in some
cases not flexible enough.| Modifier and Type | Field and Description |
|---|---|
protected static java.util.logging.Logger |
Log |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractFutureTask() |
| Modifier and Type | Method and Description |
|---|---|
protected java.lang.Throwable |
basicGetException() |
protected R |
basicGetResult() |
boolean |
cancel(boolean interrupt) |
protected abstract R |
compute() |
protected void |
computeAsync() |
R |
get() |
R |
get(long pMillisecTimeout,
java.util.concurrent.TimeUnit unit) |
java.lang.Throwable |
getException() |
protected void |
handleException() |
protected void |
handleFinally() |
protected void |
handleResult() |
boolean |
isActive() |
boolean |
isCancelled() |
boolean |
isDone() |
boolean |
isFailed() |
void |
reset() |
void |
run() |
void |
runAsync() |
protected void |
setException(java.lang.Throwable e) |
protected void |
setResult(R object) |
protected void |
taskCancelled() |
protected void |
taskFailed() |
protected void |
taskFinally() |
protected void |
taskFinished() |
protected void |
taskStarted() |
java.lang.String |
toString() |
protected void |
undo() |
protected java.lang.Throwable basicGetException()
protected R basicGetResult()
public boolean cancel(boolean interrupt)
cancel in interface java.util.concurrent.Futureprotected abstract R compute() throws java.lang.Exception
java.lang.Exceptionprotected void computeAsync()
public R get() throws java.lang.InterruptedException, java.util.concurrent.ExecutionException
get in interface java.util.concurrent.Futurejava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic R get(long pMillisecTimeout, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException, java.util.concurrent.ExecutionException, java.util.concurrent.TimeoutException
get in interface java.util.concurrent.Futurejava.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionjava.util.concurrent.TimeoutExceptionpublic java.lang.Throwable getException()
protected final void handleException()
protected final void handleFinally()
protected final void handleResult()
public boolean isActive()
public boolean isCancelled()
isCancelled in interface java.util.concurrent.Futurepublic boolean isDone()
isDone in interface java.util.concurrent.Futurepublic boolean isFailed()
public void reset()
public final void run()
run in interface java.lang.Runnablepublic void runAsync()
protected void setException(java.lang.Throwable e)
protected void setResult(R object)
protected void taskCancelled()
protected void taskFailed()
protected void taskFinally()
protected void taskFinished()
protected void taskStarted()
public java.lang.String toString()
toString in class java.lang.Objectprotected void undo()