Represents an open table. More...
#include <Table.h>
Public Types | |
enum | { OPEN_FLAG_BYPASS_TABLE_CACHE = 0x01, OPEN_FLAG_REFRESH_TABLE_CACHE = 0x02, OPEN_FLAG_NO_AUTO_TABLE_REFRESH = 0x04, SCANNER_FLAG_IGNORE_INDEX = 0x01, SCANNER_FLAG_PROFILE = 0x02 } |
enum | { MUTATOR_FLAG_NO_LOG_SYNC = Lib::RangeServer::Protocol::UPDATE_FLAG_NO_LOG_SYNC, MUTATOR_FLAG_NO_LOG = Lib::RangeServer::Protocol::UPDATE_FLAG_NO_LOG } |
Public Member Functions | |
Table (PropertiesPtr &, RangeLocatorPtr &, ConnectionManagerPtr &, Hyperspace::SessionPtr &, ApplicationQueueInterfacePtr &, NameIdMapperPtr &, const std::string &name, int32_t flags=0, uint32_t default_timeout_ms=0) | |
virtual | ~Table () |
TableMutator * | create_mutator (uint32_t timeout_ms=0, uint32_t flags=0, uint32_t flush_interval_ms=0) |
Creates a mutator on this table. More... | |
TableMutatorAsync * | create_mutator_async (ResultCallback *cb, uint32_t timeout_ms=0, uint32_t flags=0) |
Creates an asynchronous mutator on this table. More... | |
TableScanner * | create_scanner (const ScanSpec &scan_spec, uint32_t timeout_ms=0, int32_t flags=0) |
Creates a synchronous scanner on this table. More... | |
TableScannerAsync * | create_scanner_async (ResultCallback *cb, const ScanSpec &scan_spec, uint32_t timeout_ms=0, int32_t flags=0) |
Creates an asynchronous scanner on this table. More... | |
void | get_identifier (TableIdentifier *table_id_p) |
const std::string & | get_name () |
SchemaPtr | schema () |
void | refresh () |
Refresh schema etc. More... | |
void | get (TableIdentifierManaged &table_identifier, SchemaPtr &schema) |
Get a copy of table identifier and schema atomically. More... | |
void | refresh (TableIdentifierManaged &table_identifier, SchemaPtr &schema) |
Make a copy of table identifier and schema atomically also. More... | |
bool | need_refresh () |
void | invalidate () |
bool | auto_refresh () |
int32_t | get_flags () |
bool | needs_index_table () |
returns true if this table requires a index table More... | |
bool | needs_qualifier_index_table () |
returns true if this table requires a qualifier index table More... | |
bool | has_index_table () |
returns true if this table has an index More... | |
bool | has_qualifier_index_table () |
returns true if this table has a qualifier index More... | |
void | set_index_table (TablePtr idx) |
sets the index table. More... | |
void | set_qualifier_index_table (TablePtr idx) |
sets the qualifier index table More... | |
TablePtr | get_index_table () |
TablePtr | get_qualifier_index_table () |
void | set_namespace (Namespace *ns) |
Namespace * | get_namespace () |
RangeLocatorPtr | get_range_locator () |
Public Member Functions inherited from Hypertable::ClientObject | |
virtual | ~ClientObject () |
Destructor. More... | |
Private Member Functions | |
void | initialize () |
void | refresh_if_required () |
Private Attributes | |
std::mutex | m_mutex |
Mutex for serializing member access. More... | |
PropertiesPtr | m_props |
Comm * | m_comm |
ConnectionManagerPtr | m_conn_manager |
Hyperspace::SessionPtr | m_hyperspace |
SchemaPtr | m_schema |
RangeLocatorPtr | m_range_locator |
ApplicationQueueInterfacePtr | m_app_queue |
NameIdMapperPtr | m_namemap |
std::string | m_name |
TableIdentifierManaged | m_table |
int32_t | m_flags |
int | m_timeout_ms |
bool | m_stale |
std::string | m_toplevel_dir |
size_t | m_scanner_queue_size |
TablePtr | m_index_table |
TablePtr | m_qualifier_index_table |
Namespace * | m_namespace |
anonymous enum |
anonymous enum |
Table::Table | ( | PropertiesPtr & | props, |
RangeLocatorPtr & | range_locator, | ||
ConnectionManagerPtr & | conn_manager, | ||
Hyperspace::SessionPtr & | hyperspace, | ||
ApplicationQueueInterfacePtr & | app_queue, | ||
NameIdMapperPtr & | namemap, | ||
const std::string & | name, | ||
int32_t | flags = 0 , |
||
uint32_t | default_timeout_ms = 0 |
||
) |
TableMutator * Table::create_mutator | ( | uint32_t | timeout_ms = 0 , |
uint32_t | flags = 0 , |
||
uint32_t | flush_interval_ms = 0 |
||
) |
Creates a mutator on this table.
timeout_ms | maximum time in milliseconds to allow mutator methods to execute before throwing an exception |
flags | mutator flags |
flush_interval_ms | time interval in milliseconds to flush data. 0 disables it. |
TableMutatorAsync * Table::create_mutator_async | ( | ResultCallback * | cb, |
uint32_t | timeout_ms = 0 , |
||
uint32_t | flags = 0 |
||
) |
TableScanner * Table::create_scanner | ( | const ScanSpec & | scan_spec, |
uint32_t | timeout_ms = 0 , |
||
int32_t | flags = 0 |
||
) |
TableScannerAsync * Table::create_scanner_async | ( | ResultCallback * | cb, |
const ScanSpec & | scan_spec, | ||
uint32_t | timeout_ms = 0 , |
||
int32_t | flags = 0 |
||
) |
Creates an asynchronous scanner on this table.
cb | Callback to be notified when scan results arrive |
scan_spec | scan specification |
timeout_ms | maximum time in milliseconds to allow scanner methods to execute before throwing an exception |
flags | Scanner flags |
void Table::get | ( | TableIdentifierManaged & | table_identifier, |
SchemaPtr & | schema | ||
) |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
void Table::refresh | ( | TableIdentifierManaged & | table_identifier, |
SchemaPtr & | schema | ||
) |
|
inline |
sets the index table.
The index table is created by the Namespace, because it's the only object with access to the TableCache
|
inline |
|
inline |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |