libdap Updated for version 3.21.1
libdap4 is an implementation of OPeNDAP's DAP protocol.
libdap::HTTPCacheTable::CacheEntry Struct Reference

#include <HTTPCacheTable.h>

Collaboration diagram for libdap::HTTPCacheTable::CacheEntry:
Collaboration graph

Public Member Functions

 CacheEntry ()=default
 
 CacheEntry (std::string u)
 
std::string get_cachename () const
 
time_t get_corrected_initial_age () const
 
std::string get_etag () const
 
time_t get_expires () const
 
time_t get_freshness_lifetime () const
 
time_t get_lm () const
 
time_t get_max_age () const
 
bool get_must_revalidate () const
 
time_t get_response_time () const
 
bool is_no_cache () const
 
void lock_read_response ()
 
void lock_write_response ()
 
void set_no_cache (bool state)
 
void set_size (unsigned long sz)
 
void unlock_read_response ()
 
void unlock_write_response ()
 

Friends

class HTTPCacheTable
 
class HTTPCacheTest
 
class WriteOneCacheEntry
 

Detailed Description

A struct used to store information about responses in the cache's volatile memory.

About entry locking: An entry is locked using both a mutex and a counter. The counter keeps track of how many clients are accessing a given entry while the mutex provides a guarantee that updates to the counter are MT-safe. In addition, the HTTPCacheTable object maintains a map which binds the FILE* returned to a client with a given entry. This way the client can tell the HTTPCacheTable object that it is done with FILE *response and the class can arrange to update the lock counter and mutex.

Definition at line 79 of file HTTPCacheTable.h.

Constructor & Destructor Documentation

◆ CacheEntry() [1/2]

libdap::HTTPCacheTable::CacheEntry::CacheEntry ( )
default

◆ CacheEntry() [2/2]

libdap::HTTPCacheTable::CacheEntry::CacheEntry ( std::string u)
inlineexplicit

Definition at line 169 of file HTTPCacheTable.h.

Member Function Documentation

◆ get_cachename()

std::string libdap::HTTPCacheTable::CacheEntry::get_cachename ( ) const
inline

Definition at line 116 of file HTTPCacheTable.h.

◆ get_corrected_initial_age()

time_t libdap::HTTPCacheTable::CacheEntry::get_corrected_initial_age ( ) const
inline

Definition at line 132 of file HTTPCacheTable.h.

◆ get_etag()

std::string libdap::HTTPCacheTable::CacheEntry::get_etag ( ) const
inline

Definition at line 118 of file HTTPCacheTable.h.

◆ get_expires()

time_t libdap::HTTPCacheTable::CacheEntry::get_expires ( ) const
inline

Definition at line 122 of file HTTPCacheTable.h.

◆ get_freshness_lifetime()

time_t libdap::HTTPCacheTable::CacheEntry::get_freshness_lifetime ( ) const
inline

Definition at line 128 of file HTTPCacheTable.h.

◆ get_lm()

time_t libdap::HTTPCacheTable::CacheEntry::get_lm ( ) const
inline

Definition at line 120 of file HTTPCacheTable.h.

◆ get_max_age()

time_t libdap::HTTPCacheTable::CacheEntry::get_max_age ( ) const
inline

Definition at line 124 of file HTTPCacheTable.h.

◆ get_must_revalidate()

bool libdap::HTTPCacheTable::CacheEntry::get_must_revalidate ( ) const
inline

Definition at line 134 of file HTTPCacheTable.h.

◆ get_response_time()

time_t libdap::HTTPCacheTable::CacheEntry::get_response_time ( ) const
inline

Definition at line 130 of file HTTPCacheTable.h.

◆ is_no_cache()

bool libdap::HTTPCacheTable::CacheEntry::is_no_cache ( ) const
inline

Definition at line 138 of file HTTPCacheTable.h.

◆ lock_read_response()

void libdap::HTTPCacheTable::CacheEntry::lock_read_response ( )
inline

Definition at line 140 of file HTTPCacheTable.h.

◆ lock_write_response()

void libdap::HTTPCacheTable::CacheEntry::lock_write_response ( )
inline

Definition at line 160 of file HTTPCacheTable.h.

◆ set_no_cache()

void libdap::HTTPCacheTable::CacheEntry::set_no_cache ( bool state)
inline

Definition at line 136 of file HTTPCacheTable.h.

◆ set_size()

void libdap::HTTPCacheTable::CacheEntry::set_size ( unsigned long sz)
inline

Definition at line 126 of file HTTPCacheTable.h.

◆ unlock_read_response()

void libdap::HTTPCacheTable::CacheEntry::unlock_read_response ( )
inline

Definition at line 152 of file HTTPCacheTable.h.

◆ unlock_write_response()

void libdap::HTTPCacheTable::CacheEntry::unlock_write_response ( )
inline

Definition at line 162 of file HTTPCacheTable.h.

Friends And Related Symbol Documentation

◆ HTTPCacheTable

friend class HTTPCacheTable
friend

Definition at line 109 of file HTTPCacheTable.h.

◆ HTTPCacheTest

friend class HTTPCacheTest
friend

Definition at line 110 of file HTTPCacheTable.h.

◆ WriteOneCacheEntry

friend class WriteOneCacheEntry
friend

Definition at line 113 of file HTTPCacheTable.h.


The documentation for this struct was generated from the following file: