hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::cache::Cache< KeyType, ValueType, KeyHash, Count > Class Template Referencefinal

#include "cache.hpp"

Inheritance diagram for iroha::cache::Cache< KeyType, ValueType, KeyHash, Count >:
Inheritance graph
Collaboration diagram for iroha::cache::Cache< KeyType, ValueType, KeyHash, Count >:
Collaboration graph

Public Member Functions

 Cache ()
 
uint32_t getIndexSizeHighImpl () const
 
uint32_t getCacheItemCountImpl () const
 
void addItemImpl (const KeyType &key, const ValueType &value)
 
boost::optional< ValueType > findItemImpl (const KeyType &key) const
 
- Public Member Functions inherited from iroha::cache::AbstractCache< KeyType, ValueType, Cache< KeyType, ValueType, KeyHash, Count > >
uint32_t getIndexSizeHigh () const
 
uint32_t getCacheItemCount () const
 
void addItem (const KeyType &key, const ValueType &value)
 
boost::optional< ValueType > findItem (const KeyType &key) const
 

Detailed Description

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>, size_t Count = 20000ull>
class iroha::cache::Cache< KeyType, ValueType, KeyHash, Count >

Cache for arbitrary types

Template Parameters
KeyTypetype of key objects
ValueTypetype of value objects
KeyHashhasher for keys

Constructor & Destructor Documentation

◆ Cache()

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>, size_t Count = 20000ull>
iroha::cache::Cache< KeyType, ValueType, KeyHash, Count >::Cache ( )
inline

Member Function Documentation

◆ addItemImpl()

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>, size_t Count = 20000ull>
void iroha::cache::Cache< KeyType, ValueType, KeyHash, Count >::addItemImpl ( const KeyType &  key,
const ValueType &  value 
)
inline

◆ findItemImpl()

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>, size_t Count = 20000ull>
boost::optional<ValueType> iroha::cache::Cache< KeyType, ValueType, KeyHash, Count >::findItemImpl ( const KeyType &  key) const
inline

◆ getCacheItemCountImpl()

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>, size_t Count = 20000ull>
uint32_t iroha::cache::Cache< KeyType, ValueType, KeyHash, Count >::getCacheItemCountImpl ( ) const
inline

◆ getIndexSizeHighImpl()

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>, size_t Count = 20000ull>
uint32_t iroha::cache::Cache< KeyType, ValueType, KeyHash, Count >::getIndexSizeHighImpl ( ) const
inline

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