T - result type.public static class PredictableExecutor.PickyFutureTask<T> extends FutureTask<T> implements PredictableExecutor.PickyTask
FutureTask implementing PredictableExecutor.PickyTask.
Note: if the wrapped Callable or Runnable was an instance of
PredictableExecutor.PickyTask, it will use PredictableExecutor.PickyTask.hint() value, if not use Object.hashCode().
| Constructor and Description |
|---|
PickyFutureTask(Callable<T> callable)
Same as
FutureTask.FutureTask(Callable). |
PickyFutureTask(Runnable runnable,
T value)
|
| Modifier and Type | Method and Description |
|---|---|
int |
hint()
Returns hint for choosing which Thread to run this task on.
|
cancel, done, get, get, isCancelled, isDone, run, runAndReset, set, setExceptionpublic PickyFutureTask(Runnable runnable, T value)
runnable - work to dovalue - resultpublic PickyFutureTask(Callable<T> callable)
FutureTask.FutureTask(Callable).callable - work to be donepublic int hint()
PredictableExecutor.PickyTaskhint in interface PredictableExecutor.PickyTask