public class DelayTask
extends java.lang.Object
DelayTask executes tasks immediately or delayed if they arrive
too close (delay). If they arrive way too close, older tasks will be dropped.| Constructor and Description |
|---|
DelayTask(long delay)
Constructs a
DelayTask. |
DelayTask(long delay,
int priority)
Constructs a
DelayTask with a given priority. |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(java.lang.Runnable task)
Executes the task.
|
protected void |
finalize() |
public DelayTask(long delay)
DelayTask.delay - the minimum delay between two taskspublic DelayTask(long delay,
int priority)
DelayTask with a given priority.delay - the minimum delay between two taskspriority - the priority of the executing threadpublic void execute(java.lang.Runnable task)
task - the task to be executedprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwable