public abstract class PrioritizedRunnable extends java.lang.Object implements java.lang.Runnable, java.lang.Comparable<PrioritizedRunnable>
Modifier | Constructor and Description |
---|---|
protected |
PrioritizedRunnable(Priority priority) |
Modifier and Type | Method and Description |
---|---|
int |
compareTo(PrioritizedRunnable pr) |
long |
getAgeInMillis()
The elapsed time in milliseconds since this instance was created,
as calculated by the difference between
System.nanoTime()
at the time of creation, and System.nanoTime() at the
time of invocation of this method |
long |
getCreationDateInNanos() |
Priority |
priority() |
static PrioritizedRunnable |
wrap(java.lang.Runnable runnable,
Priority priority) |
protected PrioritizedRunnable(Priority priority)
public static PrioritizedRunnable wrap(java.lang.Runnable runnable, Priority priority)
public long getCreationDateInNanos()
public long getAgeInMillis()
System.nanoTime()
at the time of creation, and System.nanoTime()
at the
time of invocation of this methodpublic int compareTo(PrioritizedRunnable pr)
compareTo
in interface java.lang.Comparable<PrioritizedRunnable>
public Priority priority()