This class acts as a cache of Range location information. More...
#include <LocationCache.h>

Classes | |
| struct | CommAddressPointerLt |
| STL Strict Weak Ordering for comparing CommAddress pointers. More... | |
| struct | Value |
Public Member Functions | |
| LocationCache (uint32_t max_entries) | |
| ~LocationCache () | |
| void | insert (const char *table_name, RangeLocationInfo &range_loc_info, bool pegged=false) |
| Insert. More... | |
| bool | lookup (const char *table_name, const char *rowkey, RangeLocationInfo *range_loc_infop, bool inclusive=false) |
| Lookup. More... | |
| bool | lookup (const char *table_name, const char *rowkey, RangeAddrInfo *range_addr_infop, bool inclusive=false) |
| bool | invalidate (const char *table_name, const char *rowkey) |
| void | invalidate_host (const std::string &hostname) |
| void | display (std::ostream &) |
Private Types | |
| typedef std::map < LocationCacheKey, Value * > | LocationMap |
| typedef std::set< const CommAddress *, CommAddressPointerLt > | AddressSet |
Private Member Functions | |
| bool | lookup (const char *table_name, const char *rowkey, Value *&cacheval, bool inclusive) |
| void | move_to_head (Value *cacheval) |
| MoveToHead. More... | |
| void | remove (Value *cacheval) |
| remove More... | |
| const CommAddress * | get_constant_address (const CommAddress &addr) |
Private Attributes | |
| std::mutex | m_mutex |
| LocationMap | m_location_map |
| AddressSet | m_addresses |
| Value * | m_head |
| Value * | m_tail |
| uint32_t | m_max_entries |
| FlyweightString | m_strings |
This class acts as a cache of Range location information.
It
Definition at line 85 of file LocationCache.h.
|
private |
Definition at line 130 of file LocationCache.h.
|
private |
Definition at line 129 of file LocationCache.h.
|
inline |
Definition at line 98 of file LocationCache.h.
| LocationCache::~LocationCache | ( | ) |
Definition at line 101 of file LocationCache.cc.
| void LocationCache::display | ( | std::ostream & | out | ) |
Definition at line 194 of file LocationCache.cc.
|
private |
Definition at line 281 of file LocationCache.cc.
| void LocationCache::insert | ( | const char * | table_name, |
| RangeLocationInfo & | range_loc_info, | ||
| bool | pegged = false |
||
| ) |
Insert.
Definition at line 40 of file LocationCache.cc.
| bool LocationCache::invalidate | ( | const char * | table_name, |
| const char * | rowkey | ||
| ) |
Definition at line 144 of file LocationCache.cc.
| void LocationCache::invalidate_host | ( | const std::string & | hostname | ) |
Definition at line 174 of file LocationCache.cc.
| bool LocationCache::lookup | ( | const char * | table_name, |
| const char * | rowkey, | ||
| RangeLocationInfo * | range_loc_infop, | ||
| bool | inclusive = false |
||
| ) |
Lookup.
Definition at line 115 of file LocationCache.cc.
| bool LocationCache::lookup | ( | const char * | table_name, |
| const char * | rowkey, | ||
| RangeAddrInfo * | range_addr_infop, | ||
| bool | inclusive = false |
||
| ) |
Definition at line 131 of file LocationCache.cc.
|
private |
Definition at line 200 of file LocationCache.cc.
|
private |
MoveToHead.
Definition at line 235 of file LocationCache.cc.
|
private |
remove
Definition at line 257 of file LocationCache.cc.
|
private |
Definition at line 134 of file LocationCache.h.
|
private |
Definition at line 135 of file LocationCache.h.
|
private |
Definition at line 133 of file LocationCache.h.
|
private |
Definition at line 137 of file LocationCache.h.
|
private |
Definition at line 132 of file LocationCache.h.
|
private |
Definition at line 138 of file LocationCache.h.
|
private |
Definition at line 136 of file LocationCache.h.
1.8.8