|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectDelayedTask
public class DelayedTask extends java.lang.Object implements java.lang.Runnable, java.util.concurrent.Delayed
DelayedTask - Lets you add a task to a j.u.concurrent.DelayQueue
Modifier and Type | Method and Description |
---|---|
int |
compareTo(java.util.concurrent.Delayed delayed)
Compares order of two DelayedTasks |
long |
getDelay(java.util.concurrent.TimeUnit unit)
Returns how long this task needs to be delayed |
void |
run()
Runs the embedded task |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void run()
run
in interface java.lang.Runnable
public long getDelay(java.util.concurrent.TimeUnit unit)
getDelay
in interface java.util.concurrent.Delayed
unit
- the TimeUnit of the resultpublic int compareTo(java.util.concurrent.Delayed delayed)
compareTo
in interface java.lang.Comparable<java.util.concurrent.Delayed>
delayed
- the other object to compare to
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |