B2BITS FIX Antenna C++ 2.33.0
|
Implementation of scheduler interface. More...
#include <B2BITS_Scheduler.h>
Public Member Functions | |
virtual SchedulePtr | getSchedule (const std::string &scheduleId) const |
Returns scheduler registered by id. | |
virtual Schedules | getSchedules () const |
Returns schedules registered at the scheduler. | |
virtual SchedulerState | getState () |
Returns current scheduler's state. | |
virtual void | registerSchedule (const SchedulePtr &schedulePtr) |
Registers schedule at scheduler. | |
SchedulerImpl (System::affinity256_t const &affinity=0, Thread::Priority priority=Thread::DefaultPriority) | |
Constructor. | |
virtual void | start () |
Start scheduler operation. | |
virtual void | stop () |
Stop scheduler operation. | |
virtual void | unregisterAll () |
Unregisters all registered schedules. | |
virtual void | unregisterSchedule (const std::string &scheduleId) |
Unregisters schedule from scheduler. | |
virtual | ~SchedulerImpl () |
Public Member Functions inherited from Utils::ReferenceCounter | |
virtual bool | addRef () const throw () |
Increments reference counter. | |
virtual long | getNRef () const throw () |
Returns the current value of the reference counter. | |
ReferenceCounter () throw () | |
Constructor. | |
virtual long | release () const throw () |
Decrements reference counter. | |
Additional Inherited Members | |
Public Types inherited from System::Scheduler | |
enum | SchedulerState { SchedulerState_Stopped = 0 , SchedulerState_Started = 1 } |
typedef std::map< std::string, SchedulePtr > | Schedules |
Map of schedules registered. | |
Protected Member Functions inherited from Utils::ReferenceCounter | |
long | decrement () const throw () |
Decrements counter and returns new counter value. | |
long | increment () const throw () |
Increments counter and returns new counter value. | |
virtual | ~ReferenceCounter () |
Destructor. | |
Implementation of scheduler interface.
System::SchedulerImpl::SchedulerImpl | ( | System::affinity256_t const & | affinity = 0, |
Thread::Priority | priority = Thread::DefaultPriority ) |
Constructor.
affinity | - Affinity mask of scheduler's thread. 0 - means don't set affinity. |
priority | - Priority of scheduler's thread. |
|
virtual |
|
virtual |
Returns scheduler registered by id.
scheduleId | - id of the schedule that was previously registered at the scheduler. |
throws SchedulerException with ErrorCode_BadScheduleId error code set if there is no schedule with requested id is registered.
Implements System::Scheduler.
|
virtual |
Returns schedules registered at the scheduler.
Implements System::Scheduler.
|
virtual |
Returns current scheduler's state.
Implements System::Scheduler.
|
virtual |
Registers schedule at scheduler.
schedulePtr | - the schdule to register. |
throws SchedulerException with the following error codes set: ErrorCode_BadSchedule - if schedulePtr doesn't point to valid schedule. ErrorCode_BadScheduleId - if schedule with the same id is already registered.
Implements System::Scheduler.
|
virtual |
Start scheduler operation.
Implements System::Scheduler.
|
virtual |
Stop scheduler operation.
Implements System::Scheduler.
|
virtual |
Unregisters all registered schedules.
Implements System::Scheduler.
|
virtual |
Unregisters schedule from scheduler.
scheduleId | - id of the schdule to unregister. |
throws SchedulerException with ErrorCode_BadScheduleId error code set if there is no schedule with requested id is registered.
Implements System::Scheduler.