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
-
_continue
- This is true, if the scheduler should continue executing tasks.
-
_head
- The head of the scheduling list.
-
_listSize
- The length of the scheduling list.
-
_tail
- The tail of the scheduling list.
-
TaskBasicScheduler()
- Construct an empty TaskBasicScheduler.
-
makeTaskSHandle(Task)
- Returns a task scheduling handle for a task.
-
run()
- Executes the scheduler.
-
stop()
- Stops the scheduling.
_continue
protected boolean _continue
- This is true, if the scheduler should continue executing tasks.
_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.
_tail
protected TaskBasicScheduler. TaskBasicSHandle _tail
- The tail of the scheduling list.
_listSize
protected int _listSize
- The length of the scheduling list.
TaskBasicScheduler
public TaskBasicScheduler()
- Construct an empty TaskBasicScheduler.
makeTaskSHandle
public TaskSHandle makeTaskSHandle(Task task_)
- Returns a task scheduling handle for a task.
- Parameters:
- task_ - A task.
- Returns:
- A task scheduling handle.
run
public synchronized void run()
- Executes the scheduler.
TODO (1 h) - Change the infinite loop.
TODO (1 h) - Exception handling of the wait() method???
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