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

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

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.

ndn::CertificateCacheTtl::~CertificateCacheTtl ( )
virtual

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

Member Function Documentation

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

Implements ndn::CertificateCache.

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

References m_scheduler.

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.

void ndn::CertificateCacheTtl::reset ( )
virtual

Implements ndn::CertificateCache.

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

References m_scheduler.

size_t ndn::CertificateCacheTtl::getSize ( )
virtual

Implements ndn::CertificateCache.

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

References ndn::Name::getPrefix(), m_cache, m_defaultTtl, and m_scheduler.

Member Data Documentation

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

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

Referenced by getSize().

Cache ndn::CertificateCacheTtl::m_cache
protected

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

Referenced by getCertificate(), and getSize().

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: