libjmmcg
release_579_6_g8cffd
A C++ library containing an eclectic mix of useful, advanced components.
|
A base cache class, for deriving from to provide the real functionality. More...
#include <cache.hpp>
Classes | |
class | find_range_data |
This class creates the data for a particular key, using the supplied factory. More... | |
class | flush_cache |
This class flushes the internal associative collection of the cache according to the flush policy. More... | |
struct | range_data |
Public Types | |
typedef Factory | factory_type |
The factory that is used to create a range-data value for a particular key. More... | |
typedef factory_type::key_type | key_type |
The type of the key. More... | |
typedef factory_type::value_type | value_type |
The type of the range-data. More... | |
Public Member Functions | |
__stdcall | base (const base &) |
virtual __stdcall | ~base (void) noexcept(true) |
base &__fastcall | operator= (const base &) |
virtual bool __fastcall | empty () const noexcept(true)=0 |
Returns "true" iff the internal, associative collection is empty. More... | |
virtual void __fastcall | clear ()=0 |
This function will reset any statistics upon clearing all contents from the internal, associative collection. More... | |
virtual void __fastcall | flush ()=0 |
Flush the contents of the cache according to the flush policy. More... | |
Protected Member Functions | |
__stdcall | base (const factory_type &f) |
const factory_type &__fastcall | data_factory () const noexcept(true) |
A base cache class, for deriving from to provide the real functionality.
This class provides a low-level interface for the various cache types that can be declared to allow some sort of compatibility and flexibility between them. It also contains the factory, that identifies the basic properties of a cache: the key and value types. Flush policies, statistics and threading are all extra sugar, to some extent.
typedef Factory jmmcg::LIBJMMCG_VER_NAMESPACE::cache::base< Factory >::factory_type |
typedef factory_type::key_type jmmcg::LIBJMMCG_VER_NAMESPACE::cache::base< Factory >::key_type |
typedef factory_type::value_type jmmcg::LIBJMMCG_VER_NAMESPACE::cache::base< Factory >::value_type |
Definition at line 144 of file cache_impl.hpp.
Definition at line 149 of file cache_impl.hpp.
|
inlineexplicitprotected |
|
pure virtual |
This function will reset any statistics upon clearing all contents from the internal, associative collection.
Implemented in jmmcg::LIBJMMCG_VER_NAMESPACE::cache::ro< Factory, FP, ThrT, Stats >.
|
inlineprotectednoexcept |
Definition at line 159 of file cache_impl.hpp.
|
pure virtualnoexcept |
Returns "true" iff the internal, associative collection is empty.
Implemented in jmmcg::LIBJMMCG_VER_NAMESPACE::cache::ro< Factory, FP, ThrT, Stats >.
|
pure virtual |
Flush the contents of the cache according to the flush policy.
The flush policy must be specified by a deriving class. The direct call to "flush" is run on the same thread, not another thread wrt the caller.
Implemented in jmmcg::LIBJMMCG_VER_NAMESPACE::cache::ro< Factory, FP, ThrT, Stats >.
|
inline |
Definition at line 153 of file cache_impl.hpp.