|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mavis.util.LastExecutor.RunDelayed
private class LastExecutor.RunDelayed
Wraps a Runnable object and sets the delay after which it should be executed by a worker thread.
Field Summary | |
---|---|
private long |
expires
The point in time when this RunDelayed will expire. |
private java.lang.Runnable |
runnable
Contained Runnable object to be run after this RunDelayed has expired. |
Constructor Summary | |
---|---|
LastExecutor.RunDelayed(java.lang.Runnable runnable,
int delayMillis)
Creates a new RunDelayed item that contains runnable. |
Method Summary | |
---|---|
int |
compareTo(java.util.concurrent.Delayed delayed)
Compares this object with the specified object for order. |
long |
getDelay(java.util.concurrent.TimeUnit unit)
Returns the remaining delay associated with this object, always in milliseconds. |
java.lang.Runnable |
getRunnable()
Returns the contained Runnable. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private long expires
private java.lang.Runnable runnable
Constructor Detail |
---|
public LastExecutor.RunDelayed(java.lang.Runnable runnable, int delayMillis)
runnable
- the Runnable to be containeddelayMillis
- delay in millisecondsMethod Detail |
---|
public long getDelay(java.util.concurrent.TimeUnit unit)
getDelay
in interface java.util.concurrent.Delayed
unit
- ignored; always assumed TimeUnit.MILLISECONDS
public java.lang.Runnable getRunnable()
public int compareTo(java.util.concurrent.Delayed delayed)
compareTo
in interface java.lang.Comparable<java.util.concurrent.Delayed>
delayed
- the Delayed to be compared.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |