#include <swcdb/db/client/service/rgr/Cache.h>
Public Member Functions | |
SWC_CAN_INLINE | CachedRangers (const Config::Property::Value_int32_g::Ptr expiry_ms) noexcept |
CachedRangers (const CachedRangers &)=delete | |
CachedRangers & | operator= (const CachedRangers &)=delete |
SWC_CAN_INLINE | ~CachedRangers () noexcept |
void | clear () |
void | clear_expired () |
void | remove (const cid_t cid, const rid_t rid) |
bool | get (const cid_t cid, const rid_t rid, Comm::EndPoints &endpoints) |
void | set (const cid_t cid, const rid_t rid, const Comm::EndPoints &endpoints) |
Private Types | |
typedef std::unordered_map< cid_t, std::unordered_map< rid_t, RangeEndPoints > > | Map |
Private Attributes | |
Core::MutexSptd | m_mutex |
Config::Property::Value_int32_g::Ptr | m_expiry_ms |
|
private |
|
inlinenoexcept |
|
delete |
|
inlinenoexcept |
void SWC::client::CachedRangers::clear | ( | ) |
void SWC::client::CachedRangers::clear_expired | ( | ) |
Definition at line 19 of file Cache.cc.
References SWC::Config::Property::Value_int32_g::get(), m_expiry_ms, m_mutex, and SWC::Time::now_ms().
bool SWC::client::CachedRangers::get | ( | const cid_t | cid, |
const rid_t | rid, | ||
Comm::EndPoints & | endpoints | ||
) |
Definition at line 52 of file Cache.cc.
References SWC::Config::Property::Value_int32_g::get(), m_expiry_ms, m_mutex, and SWC::Time::now_ms().
Referenced by SWC::client::Clients::rgr_cache_get().
|
delete |
Definition at line 38 of file Cache.cc.
References m_mutex.
Referenced by SWC::client::Clients::rgr_cache_remove().
void SWC::client::CachedRangers::set | ( | const cid_t | cid, |
const rid_t | rid, | ||
const Comm::EndPoints & | endpoints | ||
) |
Definition at line 67 of file Cache.cc.
References m_mutex, and SWC::Time::now_ms().
Referenced by SWC::client::Clients::rgr_cache_set().
|
private |
Definition at line 75 of file Cache.h.
Referenced by clear_expired(), and get().
|
private |