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.