0.9.8.10
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
Hypertable::LocationCache Class Reference

This class acts as a cache of Range location information. More...

#include <LocationCache.h>

Collaboration diagram for Hypertable::LocationCache:
Collaboration graph
[legend]

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 CommAddressget_constant_address (const CommAddress &addr)
 

Private Attributes

std::mutex m_mutex
 
LocationMap m_location_map
 
AddressSet m_addresses
 
Valuem_head
 
Valuem_tail
 
uint32_t m_max_entries
 
FlyweightString m_strings
 

Detailed Description

This class acts as a cache of Range location information.

It

Definition at line 85 of file LocationCache.h.

Member Typedef Documentation

Definition at line 130 of file LocationCache.h.

Definition at line 129 of file LocationCache.h.

Constructor & Destructor Documentation

Hypertable::LocationCache::LocationCache ( uint32_t  max_entries)
inline

Definition at line 98 of file LocationCache.h.

LocationCache::~LocationCache ( )

Definition at line 101 of file LocationCache.cc.

Member Function Documentation

void LocationCache::display ( std::ostream &  out)

Definition at line 194 of file LocationCache.cc.

const CommAddress * LocationCache::get_constant_address ( const CommAddress addr)
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.

bool LocationCache::lookup ( const char *  table_name,
const char *  rowkey,
Value *&  cacheval,
bool  inclusive 
)
private

Definition at line 200 of file LocationCache.cc.

void LocationCache::move_to_head ( Value cacheval)
private

MoveToHead.

Definition at line 235 of file LocationCache.cc.

void LocationCache::remove ( Value cacheval)
private

remove

Definition at line 257 of file LocationCache.cc.

Member Data Documentation

AddressSet Hypertable::LocationCache::m_addresses
private

Definition at line 134 of file LocationCache.h.

Value* Hypertable::LocationCache::m_head
private

Definition at line 135 of file LocationCache.h.

LocationMap Hypertable::LocationCache::m_location_map
private

Definition at line 133 of file LocationCache.h.

uint32_t Hypertable::LocationCache::m_max_entries
private

Definition at line 137 of file LocationCache.h.

std::mutex Hypertable::LocationCache::m_mutex
private

Definition at line 132 of file LocationCache.h.

FlyweightString Hypertable::LocationCache::m_strings
private

Definition at line 138 of file LocationCache.h.

Value* Hypertable::LocationCache::m_tail
private

Definition at line 136 of file LocationCache.h.


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