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

AAA_Job Class Reference

#include <framework.h>

Inheritance diagram for AAA_Job:

AAA_QueueJob< T, LOCK > AAA_QueueJob< AAA_Job *, ACE_Thread_Mutex > List of all members.

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

Detailed Description

This is the base class of "job". See Job Sub-API for detailed information.


Member Function Documentation

template<class T>
T* AAA_Job::Data Type2Type< T >   )  [inline]
 

Obtain the reference to job data, with converted to a specific data type.

void AAA_Job::Delete  )  [inline]
 

Delete the job. Returns 1 when the object has been really deleted. Otherwise, 0 is returned.

int AAA_Job::Release int  n = 1  )  [inline]
 

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.

virtual bool AAA_Job::Running  )  [inline, virtual]
 

Indicates whether the job is in a state which can accept Schedule() method.

virtual int AAA_Job::Schedule AAA_Job ,
size_t  backlogSize = 1
[pure virtual]
 

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 >.

virtual int AAA_Job::Serve  )  [pure virtual]
 

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 >.


The documentation for this class was generated from the following file:
Generated on Fri Jun 25 17:35:03 2004 for Framework API for Task Management and Protocol State Machines by doxygen 1.3.5