public class PrioritizedFutureTask<V> extends FutureTask<V> implements Comparable<PrioritizedFutureTask<V>>
| Constructor and Description |
|---|
PrioritizedFutureTask(Callable<V> inCallable)
Creates a
PrioritizedFutureTask that will, upon running, execute the
given Callable. |
PrioritizedFutureTask(Runnable inRunnable,
V inResult)
Creates a
PrioritizedFutureTask that will, upon running, execute the
given Runnable, and arrange that get will return the
given result on successful completion. |
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(PrioritizedFutureTask<V> inObj2) |
boolean |
equals(Object inObj2) |
Priority |
getPriority() |
long |
getSubmissionTime() |
int |
hashCode() |
PrioritizedFutureTask<V> |
setPriority(Priority inValue) |
cancel, done, get, get, isCancelled, isDone, run, runAndReset, set, setExceptionpublic PrioritizedFutureTask(Callable<V> inCallable)
PrioritizedFutureTask that will, upon running, execute the
given Callable.inCallable - the callable taskNullPointerException - if the callable is nullpublic PrioritizedFutureTask(Runnable inRunnable, V inResult)
PrioritizedFutureTask that will, upon running, execute the
given Runnable, and arrange that get will return the
given result on successful completion.inRunnable - the runnable taskinResult - the result to return on successful completion. If
you don't need a particular result, consider using
constructions of the form:
Future<?> f = new FutureTask<Void>(runnable, null)NullPointerException - if the runnable is nullpublic PrioritizedFutureTask<V> setPriority(Priority inValue)
public Priority getPriority()
public long getSubmissionTime()
public int compareTo(PrioritizedFutureTask<V> inObj2)
compareTo in interface Comparable<PrioritizedFutureTask<V>>
jataylor@hairyfatguy.com