All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class calypso.util.tasc.TaskBasicScheduler

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

public class TaskBasicScheduler
extends Object
implements TaskScheduler
A TaskBasicScheduler schedules Tasks in FIFO order.

Author:
Petteri Koponen
See Also:
Task, TaskSHandle

Variable Index

 o _continue
This is true, if the scheduler should continue executing tasks.
 o _head
The head of the scheduling list.
 o _listSize
The length of the scheduling list.
 o _tail
The tail of the scheduling list.

Constructor Index

 o TaskBasicScheduler()
Construct an empty TaskBasicScheduler.

Method Index

 o makeTaskSHandle(Task)
Returns a task scheduling handle for a task.
 o run()
Executes the scheduler.
 o stop()
Stops the scheduling.

Variables

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

 o _head
 protected TaskBasicScheduler. TaskBasicSHandle _head
The head of the scheduling list. The first node (if the list is non-empty) is the next node after the end node.

 o _tail
 protected TaskBasicScheduler. TaskBasicSHandle _tail
The tail of the scheduling list.

 o _listSize
 protected int _listSize
The length of the scheduling list.

Constructors

 o TaskBasicScheduler
 public TaskBasicScheduler()
Construct an empty TaskBasicScheduler.

Methods

 o makeTaskSHandle
 public TaskSHandle makeTaskSHandle(Task task_)
Returns a task scheduling handle for a task.

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

TODO (1 h) - Change the infinite loop.

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

 o stop
 public 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