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

#include <TableCache.h>

Inheritance diagram for Hypertable::TableCache:
Inheritance graph
[legend]
Collaboration diagram for Hypertable::TableCache:
Collaboration graph
[legend]

Public Member Functions

 TableCache (PropertiesPtr &, RangeLocatorPtr &, ConnectionManagerPtr &, Hyperspace::SessionPtr &, ApplicationQueueInterfacePtr &, NameIdMapperPtr &namemap, uint32_t default_timeout_ms)
 
virtual ~TableCache ()
 
TablePtr get (const std::string &table_name, int32_t flags)
 
TablePtr get_unlocked (const std::string &table_name, int32_t flags)
 
bool get_schema_str (const std::string &table_name, std::string &output_schema, bool with_ids=false)
 
bool get_schema (const std::string &table_name, SchemaPtr &output_schema)
 
bool remove (const std::string &table_name)
 
void lock ()
 
void unlock ()
 

Private Types

typedef std::unordered_map
< String, TablePtr
TableMap
 

Private Member Functions

virtual void safe ()
 
virtual void expired ()
 
virtual void jeopardy ()
 
virtual void disconnected ()
 
virtual void reconnected ()
 
- Private Member Functions inherited from Hyperspace::SessionCallback
 SessionCallback ()
 
virtual ~SessionCallback ()
 
void set_id (uint32_t id)
 
uint32_t get_id ()
 

Private Attributes

std::mutex m_mutex
 
PropertiesPtr m_props
 
RangeLocatorPtr m_range_locator
 
Commm_comm
 
ConnectionManagerPtr m_conn_manager
 
Hyperspace::SessionPtr m_hyperspace
 
ApplicationQueueInterfacePtr m_app_queue
 
NameIdMapperPtr m_namemap
 
uint32_t m_timeout_ms
 
TableMap m_table_map
 

Detailed Description

Definition at line 39 of file TableCache.h.

Member Typedef Documentation

typedef std::unordered_map<String, TablePtr> Hypertable::TableCache::TableMap
private

Definition at line 88 of file TableCache.h.

Constructor & Destructor Documentation

TableCache::TableCache ( PropertiesPtr props,
RangeLocatorPtr range_locator,
ConnectionManagerPtr conn_manager,
Hyperspace::SessionPtr hyperspace,
ApplicationQueueInterfacePtr app_queue,
NameIdMapperPtr namemap,
uint32_t  default_timeout_ms 
)

Definition at line 29 of file TableCache.cc.

TableCache::~TableCache ( )
virtual

Definition at line 42 of file TableCache.cc.

Member Function Documentation

virtual void Hypertable::TableCache::disconnected ( )
inlineprivatevirtual

Implements Hyperspace::SessionCallback.

Definition at line 85 of file TableCache.h.

virtual void Hypertable::TableCache::expired ( )
inlineprivatevirtual

Implements Hyperspace::SessionCallback.

Definition at line 83 of file TableCache.h.

TablePtr TableCache::get ( const std::string &  table_name,
int32_t  flags 
)

Definition at line 46 of file TableCache.cc.

bool TableCache::get_schema ( const std::string &  table_name,
SchemaPtr output_schema 
)
Parameters
table_nameName of table
output_schemaSchema object
Returns
false if table_name is not in cache

Definition at line 82 of file TableCache.cc.

bool TableCache::get_schema_str ( const std::string &  table_name,
std::string &  output_schema,
bool  with_ids = false 
)
Parameters
table_nameName of table
output_schemastring representation of Schema object
with_idsif true return CF ids
Returns
false if table_name is not in cache

Definition at line 71 of file TableCache.cc.

TablePtr TableCache::get_unlocked ( const std::string &  table_name,
int32_t  flags 
)

Definition at line 51 of file TableCache.cc.

virtual void Hypertable::TableCache::jeopardy ( )
inlineprivatevirtual

Implements Hyperspace::SessionCallback.

Definition at line 84 of file TableCache.h.

void Hypertable::TableCache::lock ( )
inline

Definition at line 77 of file TableCache.h.

void TableCache::reconnected ( )
privatevirtual

Implements Hyperspace::SessionCallback.

Definition at line 104 of file TableCache.cc.

bool TableCache::remove ( const std::string &  table_name)
Parameters
table_name
Returns
false if entry is not in cache

Definition at line 92 of file TableCache.cc.

virtual void Hypertable::TableCache::safe ( )
inlineprivatevirtual

Implements Hyperspace::SessionCallback.

Definition at line 82 of file TableCache.h.

void Hypertable::TableCache::unlock ( )
inline

Definition at line 78 of file TableCache.h.

Member Data Documentation

ApplicationQueueInterfacePtr Hypertable::TableCache::m_app_queue
private

Definition at line 96 of file TableCache.h.

Comm* Hypertable::TableCache::m_comm
private

Definition at line 93 of file TableCache.h.

ConnectionManagerPtr Hypertable::TableCache::m_conn_manager
private

Definition at line 94 of file TableCache.h.

Hyperspace::SessionPtr Hypertable::TableCache::m_hyperspace
private

Definition at line 95 of file TableCache.h.

std::mutex Hypertable::TableCache::m_mutex
private

Definition at line 90 of file TableCache.h.

NameIdMapperPtr Hypertable::TableCache::m_namemap
private

Definition at line 97 of file TableCache.h.

PropertiesPtr Hypertable::TableCache::m_props
private

Definition at line 91 of file TableCache.h.

RangeLocatorPtr Hypertable::TableCache::m_range_locator
private

Definition at line 92 of file TableCache.h.

TableMap Hypertable::TableCache::m_table_map
private

Definition at line 99 of file TableCache.h.

uint32_t Hypertable::TableCache::m_timeout_ms
private

Definition at line 98 of file TableCache.h.


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