Generic scheduler. More...
#include <scheduler.hpp>
Public Types | |
typedef function< void()> | Event |
Public Member Functions | |
Scheduler (boost::asio::io_service &ioService) | |
~Scheduler () | |
EventId | scheduleEvent (const time::nanoseconds &after, const Event &event) |
Schedule one time event after the specified delay. More... | |
void | cancelEvent (const EventId &eventId) |
Cancel scheduled event. More... | |
void | cancelAllEvents () |
Cancel all scheduled events. More... | |
Generic scheduler.
Definition at line 44 of file scheduler.hpp.
typedef function<void()> ndn::util::scheduler::Scheduler::Event |
Definition at line 47 of file scheduler.hpp.
ndn::util::scheduler::Scheduler::Scheduler | ( | boost::asio::io_service & | ioService | ) |
Definition at line 74 of file scheduler.cpp.
ndn::util::scheduler::Scheduler::~Scheduler | ( | ) |
Definition at line 79 of file scheduler.cpp.
References cancelAllEvents().
EventId ndn::util::scheduler::Scheduler::scheduleEvent | ( | const time::nanoseconds & | after, |
const Event & | event | ||
) |
Schedule one time event after the specified delay.
Definition at line 85 of file scheduler.cpp.
Referenced by ndn::dns::Resolver::asyncResolve(), ndn::util::SegmentFetcher::fetch(), ndn::CertificateCacheTtl::getSize(), ndn::CertificateCacheTtl::insertCertificate(), ndn::PendingInterest::PendingInterest(), and ndn::CertificateCacheTtl::reset().
void ndn::util::scheduler::Scheduler::cancelEvent | ( | const EventId & | eventId | ) |
Cancel scheduled event.
Definition at line 106 of file scheduler.cpp.
Referenced by ndn::util::scheduler::ScopedEventId::cancel(), ndn::CertificateCacheTtl::getSize(), ndn::util::scheduler::ScopedEventId::operator=(), ndn::dns::Resolver::syncResolve(), and ndn::util::scheduler::ScopedEventId::~ScopedEventId().
void ndn::util::scheduler::Scheduler::cancelAllEvents | ( | ) |
Cancel all scheduled events.
Definition at line 116 of file scheduler.cpp.
Referenced by ~Scheduler().