B2BITS FIX Antenna C++  2.29.0
Public Member Functions | List of all members
System::SchedulerImpl Class Reference

Implementation of scheduler interface. More...

#include <B2BITS_Scheduler.h>

+ Inheritance diagram for System::SchedulerImpl:
+ Collaboration diagram for System::SchedulerImpl:

Public Member Functions

virtual SchedulePtr getSchedule (const std::string &scheduleId) const
 Returns scheduler registered by id. More...
 
virtual Schedules getSchedules () const
 Returns schedules registered at the scheduler. More...
 
virtual SchedulerState getState ()
 Returns current scheduler's state. More...
 
virtual void registerSchedule (const SchedulePtr &schedulePtr)
 Registers schedule at scheduler. More...
 
 SchedulerImpl (unsigned int affinity=0, Thread::Priority priority=Thread::DefaultPriority)
 Constructor. More...
 
virtual void start ()
 Start scheduler operation. More...
 
virtual void stop ()
 Stop scheduler operation. More...
 
virtual void unregisterAll ()
 Unregisters all registered schedules. More...
 
virtual void unregisterSchedule (const std::string &scheduleId)
 Unregisters schedule from scheduler. More...
 
virtual ~SchedulerImpl ()
 
- Public Member Functions inherited from Utils::ReferenceCounter
virtual bool addRef () const throw ()
 Increments reference counter. More...
 
virtual long getNRef () const throw ()
 Returns the current value of the reference counter. More...
 
 ReferenceCounter () throw ()
 Constructor. More...
 
virtual long release () const throw ()
 Decrements reference counter. More...
 

Additional Inherited Members

- Public Types inherited from System::Scheduler
enum  SchedulerState { SchedulerState_Stopped = 0, SchedulerState_Started = 1 }
 
typedef std::map< std::string, SchedulePtrSchedules
 Map of schedules registered. More...
 
- Protected Member Functions inherited from Utils::ReferenceCounter
long decrement () const throw ()
 Decrements counter and returns new counter value. More...
 
long increment () const throw ()
 Increments counter and returns new counter value. More...
 
virtual ~ReferenceCounter ()
 Destructor. More...
 

Detailed Description

Implementation of scheduler interface.

Constructor & Destructor Documentation

◆ SchedulerImpl()

System::SchedulerImpl::SchedulerImpl ( unsigned int  affinity = 0,
Thread::Priority  priority = Thread::DefaultPriority 
)

Constructor.

Parameters
affinity- Affinity mask of scheduler's thread. 0 - means don't set affinity.
priority- Priority of scheduler's thread.

◆ ~SchedulerImpl()

virtual System::SchedulerImpl::~SchedulerImpl ( )
virtual

Member Function Documentation

◆ getSchedule()

virtual SchedulePtr System::SchedulerImpl::getSchedule ( const std::string &  scheduleId) const
virtual

Returns scheduler registered by id.

Parameters
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.

◆ getSchedules()

virtual Schedules System::SchedulerImpl::getSchedules ( ) const
virtual

Returns schedules registered at the scheduler.

Implements System::Scheduler.

◆ getState()

virtual SchedulerState System::SchedulerImpl::getState ( )
virtual

Returns current scheduler's state.

Implements System::Scheduler.

◆ registerSchedule()

virtual void System::SchedulerImpl::registerSchedule ( const SchedulePtr schedulePtr)
virtual

Registers schedule at scheduler.

Parameters
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.

◆ start()

virtual void System::SchedulerImpl::start ( )
virtual

Start scheduler operation.

Implements System::Scheduler.

◆ stop()

virtual void System::SchedulerImpl::stop ( )
virtual

Stop scheduler operation.

Implements System::Scheduler.

◆ unregisterAll()

virtual void System::SchedulerImpl::unregisterAll ( )
virtual

Unregisters all registered schedules.

Implements System::Scheduler.

◆ unregisterSchedule()

virtual void System::SchedulerImpl::unregisterSchedule ( const std::string &  scheduleId)
virtual

Unregisters schedule from scheduler.

Parameters
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.