All Packages Class Hierarchy This Package Previous Next Index
Class JavaGroups.Scheduler
java.lang.Object
|
+----JavaGroups.Scheduler
- public class Scheduler
- extends Object
- implements Runnable
Implementation of a priority scheduler. The scheduler maintains a queue to the end of which
all tasks are added. It continually looks at the first queue element, assigns a thread to it,
runs the thread and waits for completion. When a new priority task is added, it
will be added to the head of the queue and the scheduler will be interrupted. In this case,
the currently handled task is suspended, and the one at the head of the queue handled. This
is recursive: a priority task can always be interrupted by another priority task.
Resursion ends when no more priority tasks are added, or when the thread pool is
exhausted.
-
Scheduler()
-
-
Scheduler(int)
-
-
Add(Runnable)
-
-
AddPrio(Runnable)
-
-
main(String[])
-
-
Reset()
-
-
run()
-
-
SetListener(SchedulerListener)
-
-
Start()
-
-
Stop()
-
Scheduler
public Scheduler()
Scheduler
public Scheduler(int num_threads)
SetListener
public void SetListener(SchedulerListener l)
run
public void run()
AddPrio
public void AddPrio(Runnable task)
Add
public void Add(Runnable task)
Reset
public void Reset()
Start
public void Start()
Stop
public void Stop()
main
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index