schedule_actor Class Reference

The schedule_actor is the controlling object for a scheduled item. More...

#include <schedule_actor.h>

Inheritance diagram for schedule_actor:

Inheritance graph
[legend]
Collaboration diagram for schedule_actor:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual int actor_id () const=0
 returns the unique identifier for this actor.
 IMPLEMENT_CLASS_NAME ("schedule_actor")
virtual outcome preprocess (schedulable &to_process)=0
 this function is called when the item is being added to the schedule.
virtual outcome activate (schedulable &to_activate, int time_allowed)=0
 called when the scheduler decides to let the item be scheduled.
virtual outcome expiration (schedulable &to_expire)=0
 invoked when the item's expiration timer goes off.
virtual void postprocess (schedulable &to_process)=0
 this function is called when the item is leaving the schedule.

Detailed Description

The schedule_actor is the controlling object for a scheduled item.

It supplies methods for the stages of scheduling an item. These correspond with: the addition of the item to the schedule (preprocess), the selection of the item for active scheduling (activate), and the conclusion of scheduling for the item (postprocess).

Definition at line 31 of file schedule_actor.h.


Member Function Documentation

virtual int schedule_actor::actor_id (  )  const [pure virtual]

returns the unique identifier for this actor.

schedule_actor::IMPLEMENT_CLASS_NAME ( "schedule_actor"   ) 

virtual outcome schedule_actor::preprocess ( schedulable to_process  )  [pure virtual]

this function is called when the item is being added to the schedule.

it does not mean the item will immediately activate, only that it will enter the schedule soon if approved. do not count on the item already residing in the schedule when preprocess is called.

virtual outcome schedule_actor::activate ( schedulable to_activate,
int  time_allowed 
) [pure virtual]

called when the scheduler decides to let the item be scheduled.

the object is allowed to run for "time_allowed" milliseconds.

virtual outcome schedule_actor::expiration ( schedulable to_expire  )  [pure virtual]

invoked when the item's expiration timer goes off.

the actor is given the chance to redeem the item by returning OKAY or can confirm the expiration by returning CANCEL or FINISHED.

virtual void schedule_actor::postprocess ( schedulable to_process  )  [pure virtual]

this function is called when the item is leaving the schedule.

at this point, that item is no longer considered active.


The documentation for this class was generated from the following file:
Generated on Fri Nov 28 04:30:58 2008 for HOOPLE Libraries by  doxygen 1.5.1