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

#include "cache.hpp"

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

Public Member Functions

 Cache (uint32_t max_handler_map_size_high=20000, uint32_t max_handler_map_size_low=10000)
 
uint32_t getIndexSizeHighImpl () const
 
uint32_t getIndexSizeLowImpl () 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 > >
uint32_t getIndexSizeHigh () const
 
uint32_t getIndexSizeLow () 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>>
class iroha::cache::Cache< KeyType, ValueType, KeyHash >

Cache for arbitrary types

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

Constructor & Destructor Documentation

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>>
iroha::cache::Cache< KeyType, ValueType, KeyHash >::Cache ( uint32_t  max_handler_map_size_high = 20000,
uint32_t  max_handler_map_size_low = 10000 
)
inline

Member Function Documentation

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>>
void iroha::cache::Cache< KeyType, ValueType, KeyHash >::addItemImpl ( const KeyType &  key,
const ValueType &  value 
)
inline
template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>>
boost::optional<ValueType> iroha::cache::Cache< KeyType, ValueType, KeyHash >::findItemImpl ( const KeyType &  key) const
inline
template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>>
uint32_t iroha::cache::Cache< KeyType, ValueType, KeyHash >::getCacheItemCountImpl ( ) const
inline
template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>>
uint32_t iroha::cache::Cache< KeyType, ValueType, KeyHash >::getIndexSizeHighImpl ( ) const
inline

Here is the caller graph for this function:

template<typename KeyType, typename ValueType, typename KeyHash = std::hash<KeyType>>
uint32_t iroha::cache::Cache< KeyType, ValueType, KeyHash >::getIndexSizeLowImpl ( ) const
inline

Here is the caller graph for this function:


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