Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

Grouped Job

This class is used for defining a job that multiplexes one or more "subjobs". Each subjob can be of different types. For example, when this class is used within a single protocol implementation, a sub-job may be dedicated to incoming message processing of the protocol while another sub-job may be dedicated to state machine handling of the protocol. In another example, a subjob may be dedicated to protocol processing of a particular protocol while another subjob may be dedicated to protocol processing of another procotol. It is also possible to define a job group in a hiearchical manner, by defining a subjob to be a class derived from AAA_JobQueueJob. This class provides the basis of organizing jobs in extensible and modular fashion in multithreading environments.

The grouped job can call its parent job's Schedule() method unless it is the root job in the job hierarchy (e.g., the job in AAA_Task). A child job can cancel its scheduling request that has been issued to its parent job via the parent job's Remove() method. When a child job is processed by its parent job, it is processed as a shared object by using Acquire and Release methods.

The grouped job implements job three scheduling policies FIFO queueing, Weighted Fair Queueing (WFQ) and Priority scheduing. WFQ and Priority scheduing can be combined in a way that WFQ is performed for each priority class. When there are jobs with different priorities in the job queue, a job with the highest priority is always served.

Application can specify whether Dequeue() method in Serve() is blocking or non-blocking, by the "blocking" boolean variable in constructor.

Since this is a shared object, the object is always allocated in heap area and should not be deleted unless no other entity shares the object. Thus, both constructor and destructor are defined as private methods. Object allocation needs to be performed via static "Create" method. Object deallocation needs to be performed via AAA_Deleter::Delete(AAA_Job*) or AAA_Deletor::()(AAA_Job*) static methods.


Generated on Fri Jun 25 17:35:04 2004 for Framework API for Task Management and Protocol State Machines by doxygen 1.3.5