#include <schedulable.h>
Inheritance diagram for schedulable:


Public Member Functions | |
| schedulable (const scheduling_id &item_id, int actor_id, const periodicity &when_to_schedule) | |
| constructs a schedulable item whose id is "item_id". | |
| virtual | ~schedulable () |
| IMPLEMENT_CLASS_NAME ("schedulable") | |
| const scheduling_id & | item_id () const |
| the scheduling id for this schedulable item. | |
| int | actor_id () const |
| returns the parent that processes this type of schedule item. | |
| virtual int | weight () const |
| provides an estimate of the size required for this schedule item. | |
| virtual istring | schedulable_text_form () const |
| returns a textual description of the data in this object. | |
| const heartbeat & | expiration () const |
| returns the state of the countdown to the item's expiration. | |
| heartbeat & | expiration () |
| sets the item's expiration characteristics. | |
| const item_statistics & | stats () const |
| returns the record of this item's behavior. | |
| item_statistics & | stats () |
| sets the statistics for this object. | |
| bool | preprocessed () const |
| used by the scheduler to track the status of this item. | |
| void | preprocessed (bool state) |
| sets the status of this item. | |
This requires a description of the period for scheduling (if the object is to be repeatedly scheduled) and it needs to know the identity (id) of the schedule_actor that will process the object during its scheduling runs.
Note: this is a heavy-weight header; it should only be included inside implementation files (*.cpp).
Definition at line 50 of file schedulable.h.
| schedulable::schedulable | ( | const scheduling_id & | item_id, | |
| int | actor_id, | |||
| const periodicity & | when_to_schedule | |||
| ) |
constructs a schedulable item whose id is "item_id".
it will be managed by the actor with "actor_id" and will be subject to the periodicity in "when_to_schedule".
Definition at line 23 of file schedulable.cpp.
| schedulable::~schedulable | ( | ) | [virtual] |
Definition at line 33 of file schedulable.cpp.
| schedulable::IMPLEMENT_CLASS_NAME | ( | "schedulable" | ) |
| const scheduling_id& schedulable::item_id | ( | ) | const [inline] |
the scheduling id for this schedulable item.
Definition at line 66 of file schedulable.h.
Referenced by scheduler::add().
| int schedulable::actor_id | ( | ) | const [inline] |
returns the parent that processes this type of schedule item.
Definition at line 69 of file schedulable.h.
Referenced by scheduler::add(), scheduler::items_scheduled(), and scheduler::zap().
| int schedulable::weight | ( | ) | const [virtual] |
provides an estimate of the size required for this schedule item.
the implementor should only need to consider those bytes that they store within their derived schedulable objects. if one doesn't override this, then the schedule's maximum weight parameter is ineffectual.
Definition at line 35 of file schedulable.cpp.
Referenced by scheduler::add(), and scheduler::zap().
| istring schedulable::schedulable_text_form | ( | ) | const [virtual] |
returns a textual description of the data in this object.
Definition at line 37 of file schedulable.cpp.
References periodicity::per_text_form(), unique_id< uniquifier >::raw_id(), istring::SPRINTF, item_statistics::text_form(), and heartbeat::time_left().
| const heartbeat& schedulable::expiration | ( | ) | const [inline] |
returns the state of the countdown to the item's expiration.
Definition at line 82 of file schedulable.h.
Referenced by scheduler::mark_dead().
| heartbeat& schedulable::expiration | ( | ) | [inline] |
| const item_statistics& schedulable::stats | ( | ) | const [inline] |
returns the record of this item's behavior.
Definition at line 87 of file schedulable.h.
Referenced by scheduler::add().
| item_statistics& schedulable::stats | ( | ) | [inline] |
| bool schedulable::preprocessed | ( | ) | const [inline] |
used by the scheduler to track the status of this item.
Definition at line 92 of file schedulable.h.
| void schedulable::preprocessed | ( | bool | state | ) | [inline] |
1.5.1