userver: multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator > Class Template Reference
Loading...
Searching...
No Matches
multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator > Class Template Reference

#include </data/code/userver/libraries/multi-index-lru/include/userver/multi-index-lru/expirable_container.hpp>

Detailed Description

template<typename Value, typename IndexSpecifierList, typename Allocator>
class multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >

MultiIndex LRU expirable container.

Definition at line 19 of file expirable_container.hpp.

Public Member Functions

 ExpirableContainer (size_t max_size, std::chrono::milliseconds ttl)
 
template<typename... Args>
auto emplace (Args &&... args)
 
bool insert (const Value &value)
 
bool insert (Value &&value)
 
template<typename Tag, typename Key>
auto find (const Key &key)
 
template<typename Tag, typename Key>
auto find_no_update (const Key &key) const
 
template<typename Tag, typename Key>
auto equal_range (const Key &key)
 
template<typename Tag, typename Key>
auto equal_range_no_update (const Key &key) const
 
template<typename Tag, typename Key>
bool contains (const Key &key)
 
template<typename Tag, typename Key>
bool contains_no_update (const Key &key) const
 
template<typename Tag, typename Key>
bool erase (const Key &key)
 
std::size_t size () const noexcept
 
bool empty () const noexcept
 
std::size_t capacity () const noexcept
 
void set_capacity (std::size_t new_capacity)
 
void clear ()
 
template<typename Tag>
auto end ()
 
void cleanup_expired ()
 

Constructor & Destructor Documentation

◆ ExpirableContainer()

template<typename Value, typename IndexSpecifierList, typename Allocator>
multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::ExpirableContainer ( size_t max_size,
std::chrono::milliseconds ttl )
inlineexplicit

Definition at line 21 of file expirable_container.hpp.

Member Function Documentation

◆ capacity()

template<typename Value, typename IndexSpecifierList, typename Allocator>
std::size_t multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::capacity ( ) const
inlinenoexcept

Definition at line 113 of file expirable_container.hpp.

◆ cleanup_expired()

template<typename Value, typename IndexSpecifierList, typename Allocator>
void multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::cleanup_expired ( )
inline

Definition at line 124 of file expirable_container.hpp.

◆ clear()

template<typename Value, typename IndexSpecifierList, typename Allocator>
void multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::clear ( )
inline

Definition at line 117 of file expirable_container.hpp.

◆ contains()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename Tag, typename Key>
bool multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::contains ( const Key & key)
inline

Definition at line 97 of file expirable_container.hpp.

◆ contains_no_update()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename Tag, typename Key>
bool multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::contains_no_update ( const Key & key) const
inline

Definition at line 102 of file expirable_container.hpp.

◆ emplace()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename... Args>
auto multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::emplace ( Args &&... args)
inline

Definition at line 29 of file expirable_container.hpp.

◆ empty()

template<typename Value, typename IndexSpecifierList, typename Allocator>
bool multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::empty ( ) const
inlinenoexcept

Definition at line 112 of file expirable_container.hpp.

◆ end()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename Tag>
auto multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::end ( )
inline

Definition at line 120 of file expirable_container.hpp.

◆ equal_range()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename Tag, typename Key>
auto multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::equal_range ( const Key & key)
inline

Definition at line 67 of file expirable_container.hpp.

◆ equal_range_no_update()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename Tag, typename Key>
auto multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::equal_range_no_update ( const Key & key) const
inline

Definition at line 91 of file expirable_container.hpp.

◆ erase()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename Tag, typename Key>
bool multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::erase ( const Key & key)
inline

Definition at line 107 of file expirable_container.hpp.

◆ find()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename Tag, typename Key>
auto multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::find ( const Key & key)
inline

Definition at line 44 of file expirable_container.hpp.

◆ find_no_update()

template<typename Value, typename IndexSpecifierList, typename Allocator>
template<typename Tag, typename Key>
auto multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::find_no_update ( const Key & key) const
inline

Definition at line 61 of file expirable_container.hpp.

◆ insert() [1/2]

template<typename Value, typename IndexSpecifierList, typename Allocator>
bool multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::insert ( const Value & value)
inline

Definition at line 39 of file expirable_container.hpp.

◆ insert() [2/2]

template<typename Value, typename IndexSpecifierList, typename Allocator>
bool multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::insert ( Value && value)
inline

Definition at line 41 of file expirable_container.hpp.

◆ set_capacity()

template<typename Value, typename IndexSpecifierList, typename Allocator>
void multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::set_capacity ( std::size_t new_capacity)
inline

Definition at line 115 of file expirable_container.hpp.

◆ size()

template<typename Value, typename IndexSpecifierList, typename Allocator>
std::size_t multi_index_lru::ExpirableContainer< Value, IndexSpecifierList, Allocator >::size ( ) const
inlinenoexcept

Definition at line 111 of file expirable_container.hpp.


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