39 BOOST_ASSERT(!m_timeoutEvent);
40 m_lastInterestName = interestName;
59 auto it = m_fiMap.find(faceId);
60 return it != m_fiMap.end() ? &it->second :
nullptr;
66 auto ret = m_fiMap.emplace(std::piecewise_construct,
67 std::forward_as_tuple(faceId),
68 std::forward_as_tuple(m_rttEstimatorOpts));
69 auto& faceInfo = ret.first->second;
71 extendFaceInfoLifetime(faceInfo, faceId);
80 [=] { m_fiMap.erase(faceId); });
89 : m_measurements(measurements)
118 BOOST_ASSERT(info !=
nullptr);
125 auto* me = m_measurements.
get(fibEntry);
130 me ==
nullptr && prefixLen <= prefix.
size();
136 BOOST_ASSERT(me !=
nullptr);
142 BOOST_ASSERT(info !=
nullptr);
PartialName getPrefix(ssize_t nComponents) const
Returns a prefix of the name.
const Name & getPrefix() const
Copyright (c) 2011-2015 Regents of the University of California.
time::nanoseconds getEstimatedRto() const
Returns the estimated RTO value.
time::nanoseconds scheduleTimeout(const Name &interestName, scheduler::EventCallback cb)
static const time::nanoseconds RTT_TIMEOUT
std::function< void()> EventCallback
Function to be invoked when a scheduled event expires.
bool isPrefixOf(const Name &other) const
Check if this name is a prefix of another name.
void extendFaceInfoLifetime(FaceInfo &info, FaceId faceId)
boost::chrono::microseconds microseconds
AsfMeasurements(MeasurementsAccessor &measurements)
Stores strategy information about each face in this namespace.
void extendLifetime(Entry &entry, const time::nanoseconds &lifetime)
extend lifetime of an entry
Entry * findLongestPrefixMatch(const Name &name, const EntryPredicate &pred=AnyEntry()) const
perform a longest prefix match for name
FaceInfo & getOrCreateFaceInfo(const fib::Entry &fibEntry, const Name &interestName, FaceId faceId)
Scheduler & getScheduler()
Returns the global Scheduler instance for the calling thread.
Represents a Measurements entry.
FaceInfo * getFaceInfo(const fib::Entry &fibEntry, const Name &interestName, FaceId faceId)
NamespaceInfo & getOrCreateNamespaceInfo(const fib::Entry &fibEntry, const Name &prefix)
void cancelTimeout(const Name &prefix)
Copyright (c) 2011-2015 Regents of the University of California.
static constexpr time::microseconds MEASUREMENTS_LIFETIME
Represents an absolute name.
Strategy information for each face in a namespace.
size_t size() const
Returns the number of components.
FaceInfo * getFaceInfo(FaceId faceId)
allows Strategy to access portion of Measurements table under its namespace
NamespaceInfo * getNamespaceInfo(const Name &prefix)
void cancel()
Cancel the operation.
Entry * get(const Name &name)
find or insert a Measurements entry for name
uint64_t FaceId
Identifies a face.
FaceInfo & getOrCreateFaceInfo(FaceId faceId)
boost::chrono::nanoseconds nanoseconds
static const time::nanoseconds RTT_NO_MEASUREMENT