#include <PseudoScheduler.h>
Inherits Scheduler.
Public Member Functions | |
PseudoScheduler () | |
void | start () |
Called when a node is started. | |
void | shutdown () |
Called when a node is stopped. | |
void | scheduleExclusiveTask (ptr< SchedulerTask >) |
Schedules a task to be run as soon as possible, at some point when no boxes are running. | |
void | topologyChanged () |
Invoked when the network topology changes, i.e., one or more boxes or streams were added or removed. | |
void | drain () |
Drains the network: waits until there are no more tuples at all in the network and then shuts the network. | |
void | removeFromSchedule (QBox *b) |
Public Attributes | |
vector< string > | _disabled_boxes |
|
|
|
Drains the network: waits until there are no more tuples at all in the network and then shuts the network. Blocks until this is complete, at which point the only valid operation is shutdown(). May be invoked only if the scheduler supports draining. Reimplemented from Scheduler.
|
|
Reimplemented from Scheduler.
|
|
Schedules a task to be run as soon as possible, at some point when no boxes are running. For example, the scheduler may maintain a thread-safe vector of ptr<SchedulerTask>s. Whenever this vector becomes non-empty, it can signal box-running threads to pause; wait for all pending run() calls to complete; and then run the tasks in one of the box-running threads. Implements Scheduler.
|
|
Called when a node is stopped. The implementation of this method must stop any threads that are running boxes and wait for their termination (i.e., join them). Implements Scheduler.
|
|
Called when a node is started. The implementation of this method should create one or more threads to run boxes. Implements Scheduler.
|
|
Invoked when the network topology changes, i.e., one or more boxes or streams were added or removed. This method may only be invoked from within an exclusive task (since the network topology may only change within an exclusive task), and only if the scheduler supports dynamic networks. Reimplemented from Scheduler.
|
|
|