|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Scheduler
A simple scheduler that accepts a task and schedules its for execution at its own discretion (i.e., the behavior of the actual implementor). The only possible hint is a nice value that should be subtracted from any fixed scheduling interval. Additionally, a null object is provided that can be used to disable scheduled execution.
Field Summary | |
---|---|
static Scheduler |
NULL_SCHEDULER
This is a null object that can be used in case no scheduling is needed. |
Method Summary | |
---|---|
void |
schedule(java.lang.Runnable task)
Schedule the given task for execution at a later time based on the behavior of the actual implementor of this interface. |
void |
schedule(java.lang.Runnable task,
int nice)
Schedule the given task for execution at a later time based on the behavior of the actual implementor of this interface. |
Field Detail |
---|
static final Scheduler NULL_SCHEDULER
Method Detail |
---|
void schedule(java.lang.Runnable task)
task
- The task to schedule for execution.void schedule(java.lang.Runnable task, int nice)
task
- The task to schedule for execution.nice
- A value to subtract from any fixed scheduling interval.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |