JACK 5.4 Application Interface

aos.jack.jak.task
Class PriorityTaskManager

java.lang.Object
  extended byaos.jack.jak.task.TaskManager
      extended byaos.jack.jak.task.SimpleTaskManager
          extended byaos.jack.jak.task.SimpleRRTaskManager
              extended byaos.jack.jak.task.PriorityTaskManager

public class PriorityTaskManager
extends SimpleRRTaskManager

A task manager for priority based round-robin scheduling. PriorityTaskManager implements a task scheduling policy which commits to the current task only while it is of highest priority, and for at most a given number of plan steps. When that number of plan steps have been processed, the task is rescheduled to the end of the same priority tasks in the task list, and the processing continues with the new first task.

Task priority is initially taken from the priority field of the event causing the task, and it may thereafter be changed by plans. The task priority is a signed integer, and the default priority is 0.


Constructor Summary
PriorityTaskManager()
          Constructs a PriorityTaskManager with the default round-robin limit of 100 plan steps.
PriorityTaskManager(aos.jack.jak.task.TaskListMonitor m)
          Constructs a PriorityTaskManager with given TaskListMonitor, using the default round-robin limit of 100.
PriorityTaskManager(aos.jack.jak.task.TaskListMonitor m, int c)
          Constructs a PriorityTaskManager with given TaskListMonitor and round-robin limit.
 
Method Summary
 void add(aos.jack.jak.task.Task in)
           
 
Methods inherited from class aos.jack.jak.task.SimpleRRTaskManager
getCount, getNext, setCount
 
Methods inherited from class aos.jack.jak.task.SimpleTaskManager
dump, getTasks, remove, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PriorityTaskManager

public PriorityTaskManager(aos.jack.jak.task.TaskListMonitor m,
                           int c)
Constructs a PriorityTaskManager with given TaskListMonitor and round-robin limit.


PriorityTaskManager

public PriorityTaskManager(aos.jack.jak.task.TaskListMonitor m)
Constructs a PriorityTaskManager with given TaskListMonitor, using the default round-robin limit of 100.


PriorityTaskManager

public PriorityTaskManager()
Constructs a PriorityTaskManager with the default round-robin limit of 100 plan steps.

Method Detail

add

public void add(aos.jack.jak.task.Task in)
Overrides:
add in class SimpleRRTaskManager

JACK 5.4 Application Interface

Copyright (C) 1999-2008, Agent Oriented Software Pty. Ltd.

US Government Restricted Rights
The JACK Modules and relevant Software Material have been developed entirely at private expense and are accordingly provided with RESTRICTED RIGHTS. Use, duplication, or disclosure by Government is subject to restrictions as set forth in subparagraph (c)(1)(ii) of DFARS 252.227-7013 or subparagraph (c)(1) and (2) of the Commercial Computer Software Restricted Rights and 48 CFR 52.2270-19, as applicable.


Agent Oriented Software Pty. Ltd.     http://www.aosgrp.com
PO Box 639, Carlton South, Victoria 3053, Australia
Phone: +61 3 9349 5055, Fax: +61 3 9349 5088