NS-3 based Named Data Networking (NDN) simulator
ndnSIM 2.5: NDN, CCN, CCNx, content centric networks
API Documentation
ndn::scheduler::Scheduler Class Reference

Generic time-based scheduler. More...

#include <scheduler.hpp>

Inheritance diagram for ndn::scheduler::Scheduler:
Collaboration diagram for ndn::scheduler::Scheduler:

Public Member Functions

 Scheduler (DummyIoService &ioService)
 
 ~Scheduler ()
 
EventId schedule (time::nanoseconds after, EventCallback callback)
 Schedule a one-time event after the specified delay. More...
 
void cancelAllEvents ()
 Cancel all scheduled events. More...
 

Detailed Description

Generic time-based scheduler.

Definition at line 132 of file scheduler.hpp.

Constructor & Destructor Documentation

◆ Scheduler()

ndn::scheduler::Scheduler::Scheduler ( DummyIoService ioService)
explicit

Definition at line 86 of file scheduler.cpp.

◆ ~Scheduler()

ndn::scheduler::Scheduler::~Scheduler ( )

Definition at line 90 of file scheduler.cpp.

References cancelAllEvents().

Member Function Documentation

◆ schedule()

EventId ndn::scheduler::Scheduler::schedule ( time::nanoseconds  after,
EventCallback  callback 
)

Schedule a one-time event after the specified delay.

Returns
EventId that can be used to cancel the scheduled event

Definition at line 96 of file scheduler.cpp.

References nonstd::optional_lite::std11::move().

Referenced by ndn::Face::Impl::Impl(), ndn::security::v2::CertificateFetcherFromNetwork::nackCallback(), ndn::InMemoryStorageEntry::scheduleMarkStale(), and ndn::util::SegmentFetcher::stop().

◆ cancelAllEvents()

void ndn::scheduler::Scheduler::cancelAllEvents ( )

Cancel all scheduled events.

Definition at line 132 of file scheduler.cpp.

Referenced by ~Scheduler().


The documentation for this class was generated from the following files: