xorp

TaskList Class Reference

List of all members.

Public Member Functions

void run ()
 Expire all pending XorpTask objects associated with TaskList.
XorpTask new_oneoff_task (const OneoffTaskCallback &cb, int priority=XorpTask::PRIORITY_DEFAULT, int weight=XorpTask::WEIGHT_DEFAULT)
 Create a XorpTask that will be scheduled only once.
XorpTask new_task (const RepeatedTaskCallback &cb, int priority=XorpTask::PRIORITY_DEFAULT, int weight=XorpTask::WEIGHT_DEFAULT)
 Create a repeated XorpTask.
int get_runnable_priority () const
 Get the priority of the highest priority runnable task.
void schedule_node (TaskNode *node)
void unschedule_node (TaskNode *node)
bool empty () const

Private Member Functions

RoundRobinQueuefind_round_robin (int priority)

Private Attributes

map< int, RoundRobinQueue * > _rr_list

Member Function Documentation

int TaskList::get_runnable_priority ( ) const

Get the priority of the highest priority runnable task.

Returns:
the priority (lowest value is best priority).
XorpTask TaskList::new_oneoff_task ( const OneoffTaskCallback &  cb,
int  priority = XorpTask::PRIORITY_DEFAULT,
int  weight = XorpTask::WEIGHT_DEFAULT 
)

Create a XorpTask that will be scheduled only once.

Parameters:
cbcallback object that is invoked when task is run.
Returns:
the XorpTask created.
XorpTask TaskList::new_task ( const RepeatedTaskCallback &  cb,
int  priority = XorpTask::PRIORITY_DEFAULT,
int  weight = XorpTask::WEIGHT_DEFAULT 
)

Create a repeated XorpTask.

Parameters:
cbcallback object that is invoked when task is run. If the callback returns true, the task will continue to run, otherwise it will be unscheduled.
Returns:
the XorpTask created.

The documentation for this class was generated from the following files:
 All Classes Namespaces Functions Variables Typedefs Enumerations