All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class calypso.util.tasc.PriorityTaskBasicScheduler

java.lang.Object
   |
   +----calypso.util.tasc.PriorityTaskBasicScheduler

public class PriorityTaskBasicScheduler
extends Object
implements PriorityTaskScheduler
A basic scheduler for priority tasks.

Author:
Petteri Koponen
See Also:
PriorityTask, PriorityTaskSHandle

Variable Index

 o _continue
This is true, if the scheduler should continue executing tasks.
 o _handleList
An ordered list that contains PriorityTaskSHandles.

Constructor Index

 o PriorityTaskBasicScheduler()

Method Index

 o makePriorityTaskSHandle(PriorityTask)
Returns a priority task scheduling handle for a priority task.
 o makeTaskSHandle(Task)
Returns a task scheduling handle for (ordinary) tasks.
 o run()
Executes the scheduler.
 o stop()
Stops the scheduling.

Variables

 o _continue
 boolean _continue
This is true, if the scheduler should continue executing tasks.

 o _handleList
 OrderedList _handleList
An ordered list that contains PriorityTaskSHandles.

See Also:
OrderedList

Constructors

 o PriorityTaskBasicScheduler
 public PriorityTaskBasicScheduler()

Methods

 o makePriorityTaskSHandle
 public PriorityTaskSHandle makePriorityTaskSHandle(PriorityTask task_)
Returns a priority task scheduling handle for a priority task.

Parameters:
task_ - A priority task.
Returns:
A priority task scheduling handle.
 o makeTaskSHandle
 public TaskSHandle makeTaskSHandle(Task task_)
Returns a task scheduling handle for (ordinary) tasks. The priority of the handle equals the default priority.

TODO (0,5 h) - Write down priority levels somewhere.

Parameters:
task_ - A task.
Returns:
A task scheduling handle.
 o run
 public synchronized void run()
Executes the scheduler.

TODO (1 h) - Exception handling of the wait() method???

 o stop
 public synchronized void stop()
Stops the scheduling. This method causes the scheduler to return from its run() method and by doing so to deactivate its thread. However, this method does not clear the queue(s) of the thread.


All Packages  Class Hierarchy  This Package  Previous  Next  Index