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

Cache of validated certificates with freshness-based eviction policy. More...

#include <certificate-cache-ttl.hpp>

Inheritance diagram for ndn::CertificateCacheTtl:
Collaboration diagram for ndn::CertificateCacheTtl:

Public Member Functions

 CertificateCacheTtl (boost::asio::io_service &io, const time::seconds &defaultTtl=time::seconds(3600))
 
virtual ~CertificateCacheTtl ()
 
virtual void insertCertificate (shared_ptr< const IdentityCertificate > certificate)
 
virtual shared_ptr< const IdentityCertificategetCertificate (const Name &certificateNameWithoutVersion)
 
virtual void reset ()
 
virtual size_t getSize ()
 
- Public Member Functions inherited from ndn::CertificateCache
virtual ~CertificateCache ()
 
bool isEmpty ()
 

Protected Types

typedef std::map< Name, std::pair< shared_ptr< const IdentityCertificate >, EventId > > Cache
 

Protected Attributes

time::seconds m_defaultTtl
 
Cache m_cache
 
Scheduler m_scheduler
 

Detailed Description

Cache of validated certificates with freshness-based eviction policy.

Validated certificates will stay in cache for the duration of their freshness period. The lifetime of the certificate in cache can be extended by "re-inserting" it in the cache.

Definition at line 39 of file certificate-cache-ttl.hpp.

Member Typedef Documentation

§ Cache

typedef std::map<Name, std::pair<shared_ptr<const IdentityCertificate>, EventId> > ndn::CertificateCacheTtl::Cache
protected

Definition at line 72 of file certificate-cache-ttl.hpp.

Constructor & Destructor Documentation

§ CertificateCacheTtl()

ndn::CertificateCacheTtl::CertificateCacheTtl ( boost::asio::io_service &  io,
const time::seconds &  defaultTtl = time::seconds(3600) 
)
explicit

Definition at line 28 of file certificate-cache-ttl.cpp.

§ ~CertificateCacheTtl()

ndn::CertificateCacheTtl::~CertificateCacheTtl ( )
virtual

Definition at line 35 of file certificate-cache-ttl.cpp.

Member Function Documentation

§ insertCertificate()

void ndn::CertificateCacheTtl::insertCertificate ( shared_ptr< const IdentityCertificate certificate)
virtual

§ getCertificate()

shared_ptr< const IdentityCertificate > ndn::CertificateCacheTtl::getCertificate ( const Name certificateNameWithoutVersion)
virtual

Implements ndn::CertificateCache.

Definition at line 46 of file certificate-cache-ttl.cpp.

References m_cache.

§ reset()

void ndn::CertificateCacheTtl::reset ( )
virtual

§ getSize()

Member Data Documentation

§ m_defaultTtl

time::seconds ndn::CertificateCacheTtl::m_defaultTtl
protected

Definition at line 74 of file certificate-cache-ttl.hpp.

Referenced by getSize().

§ m_cache

Cache ndn::CertificateCacheTtl::m_cache
protected

Definition at line 75 of file certificate-cache-ttl.hpp.

Referenced by getCertificate(), and getSize().

§ m_scheduler

Scheduler ndn::CertificateCacheTtl::m_scheduler
protected

Definition at line 76 of file certificate-cache-ttl.hpp.

Referenced by getSize(), insertCertificate(), and reset().


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