 |
Kea
1.5.0
|
Go to the documentation of this file.
11 #include <boost/noncopyable.hpp>
12 #include <boost/shared_ptr.hpp>
125 void setup(
const std::string& timer_name);
135 void cancel(
const std::string& timer_name);
156 #endif // TIMER_MGR_H
void registerTimer(const std::string &timer_name, const asiolink::IntervalTimer::Callback &callback, const long interval, const asiolink::IntervalTimer::Mode &scheduling_mode)
Registers new timer in the TimerMgr.
void unregisterTimer(const std::string &timer_name)
Unregisters specified timer.
boost::function< void()> Callback
Defines the logger used by the top-level component of kea-dhcp-ddns.
Manages a pool of asynchronous interval timers.
bool isTimerRegistered(const std::string &timer_name)
Checks if the timer with a specified name has been registered.
void unregisterTimers()
Unregisters all timers.
static const TimerMgrPtr & instance()
Returns pointer to the sole instance of the TimerMgr.
void setup(const std::string &timer_name)
Schedules the execution of the interval timer.
Implementation of the TimerMgr.
Mode
Defines possible timer modes used to setup a timer.
boost::shared_ptr< IOService > IOServicePtr
Defines a smart pointer to an IOService instance.
void cancel(const std::string &timer_name)
Cancels the execution of the interval timer.
void setIOService(const asiolink::IOServicePtr &io_service)
Sets IO service to be used by the Timer Manager.
boost::shared_ptr< TimerMgr > TimerMgrPtr
Type definition of the shared pointer to TimerMgr.
size_t timersCount() const
Returns the number of registered timers.