#include <framework.h>
Inheritance diagram for AAA_Job:
Public Member Functions | |
AAA_Job (AAA_JobData *d=0, char *name=0) | |
Constructor. | |
virtual int | Serve ()=0 |
virtual int | Schedule (AAA_Job *, size_t backlogSize=1)=0 |
void | Delete () |
virtual bool | ExistBacklog () |
Indicates whether there is a backlog or not. | |
virtual size_t | BacklogSize () |
The number of backlog. | |
std::string & | Name () |
Obtain the name of the job. | |
AAA_JobData * | Data () |
Obtain the reference to job data. | |
template<class T> T * | Data (Type2Type< T >) |
unsigned & | Priority () |
Obtain the reference to priority. | |
unsigned & | Weight () |
Obtain the reference to weight. | |
void | Acquire () |
Increase the job reference counter. | |
int | Release (int n=1) |
virtual bool | Running () |
bool | operator== (AAA_Job *job) |
bool | operator!= (AAA_Job *job) |
Protected Member Functions | |
virtual | ~AAA_Job () |
Virtual destructor. | |
Friends | |
class | AAA_JobDeleter |
|
Obtain the reference to job data, with converted to a specific data type. |
|
Delete the job. Returns 1 when the object has been really deleted. Otherwise, 0 is returned. |
|
Decrease the job reference counter by the specified number. If refcount becomes less than 0, then delete the job and return -1, otherwise, return 0. |
|
Indicates whether the job is in a state which can accept Schedule() method. |
|
This is called by other jobs to request for scheduling to this job. This is called by other jobs to request for scheduling to this job. The backlogSize contains the current backlog size of the job and used by the scheduling job to enforce various scheduling policies. Implemented in AAA_QueueJob< T, LOCK >, and AAA_QueueJob< AAA_Job *, ACE_Thread_Mutex >. |
|
This pure virtual function is used for serving the job. The number of backlog is returned. Implemented in AAA_QueueJob< T, LOCK >, and AAA_QueueJob< AAA_Job *, ACE_Thread_Mutex >. |