Package org.teiid.dqp.internal.process
Class FutureWork<T>
- java.lang.Object
-
- java.util.concurrent.FutureTask<T>
-
- org.teiid.dqp.internal.process.FutureWork<T>
-
- All Implemented Interfaces:
Runnable
,Future<T>
,RunnableFuture<T>
,ThreadReuseExecutor.PrioritizedRunnable
public final class FutureWork<T> extends FutureTask<T> implements ThreadReuseExecutor.PrioritizedRunnable
-
-
Field Summary
-
Fields inherited from interface org.teiid.dqp.internal.process.ThreadReuseExecutor.PrioritizedRunnable
NO_WAIT_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description FutureWork(Runnable processor, T result, int priority)
FutureWork(Callable<T> processor, int priority)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
done()
long
getCreationTime()
DQPWorkContext
getDqpWorkContext()
int
getPriority()
The execution priority - higher is lowervoid
run()
void
setRequestId(String requestId)
-
Methods inherited from class java.util.concurrent.FutureTask
cancel, get, get, isCancelled, isDone, runAndReset, set, setException
-
-
-
-
Method Detail
-
setRequestId
public void setRequestId(String requestId)
-
run
public void run()
- Specified by:
run
in interfaceRunnable
- Specified by:
run
in interfaceRunnableFuture<T>
- Overrides:
run
in classFutureTask<T>
-
getPriority
public int getPriority()
Description copied from interface:ThreadReuseExecutor.PrioritizedRunnable
The execution priority - higher is lower- Specified by:
getPriority
in interfaceThreadReuseExecutor.PrioritizedRunnable
-
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTime
in interfaceThreadReuseExecutor.PrioritizedRunnable
-
getDqpWorkContext
public DQPWorkContext getDqpWorkContext()
- Specified by:
getDqpWorkContext
in interfaceThreadReuseExecutor.PrioritizedRunnable
-
done
protected void done()
- Overrides:
done
in classFutureTask<T>
-
-