OpenSDN source code
cass::cql::CqlIfImpl Class Reference

#include <cql_if_impl.h>

Collaboration diagram for cass::cql::CqlIfImpl:

Classes

struct  SessionState
 

Public Member Functions

 CqlIfImpl (EventManager *evm, const std::vector< std::string > &cassandra_ips, int cassandra_port, const std::string &cassandra_user, const std::string &cassandra_password, bool use_ssl, const std::string &ca_certs_path, interface::CassLibrary *cci)
 
virtual ~CqlIfImpl ()
 
bool CreateKeyspaceIfNotExistsSync (const std::string &keyspace, const std::string &replication_factor, CassConsistency consistency)
 
bool UseKeyspaceSync (const std::string &keyspace, CassConsistency consistency)
 
bool UseKeyspaceSyncOnSchemaSession (const std::string &keyspace, CassConsistency consistency)
 
bool CreateTableIfNotExistsSync (const GenDb::NewCf &cf, const std::string &compaction_strategy, CassConsistency consistency)
 
bool CreateIndexIfNotExistsSync (const std::string &cfname, const std::string &column, const std::string &indexname, CassConsistency consistency, const GenDb::ColIndexMode::type index_mode)
 
bool LocatePrepareInsertIntoTable (const GenDb::NewCf &cf)
 
bool IsTablePresent (const std::string &table)
 
int IsTableStatic (const std::string &table)
 
bool IsTableDynamic (const std::string &table)
 
bool InsertIntoTableSync (std::auto_ptr< GenDb::ColList > v_columns, CassConsistency consistency)
 
bool InsertIntoTableAsync (std::auto_ptr< GenDb::ColList > v_columns, CassConsistency consistency, impl::CassAsyncQueryCallback cb)
 
bool InsertIntoTablePrepareAsync (std::auto_ptr< GenDb::ColList > v_columns, CassConsistency consistency, impl::CassAsyncQueryCallback cb)
 
bool IsInsertIntoTablePrepareSupported (const std::string &table)
 
bool SelectFromTableSync (const std::string &cfname, const GenDb::DbDataValueVec &rkey, CassConsistency consistency, GenDb::NewColVec *out)
 
bool SelectFromTableSync (const std::string &cfname, CassConsistency consistency, GenDb::ColListVec *out)
 
bool SelectFromTableClusteringKeyRangeSync (const std::string &cfname, const GenDb::DbDataValueVec &rkey, const GenDb::ColumnNameRange &ck_range, CassConsistency consistency, GenDb::NewColVec *out)
 
bool SelectFromTableClusteringKeyRangeFieldNamesSync (const std::string &cfname, const GenDb::DbDataValueVec &rkey, const GenDb::ColumnNameRange &ck_range, CassConsistency consistency, const GenDb::FieldNamesToReadVec &read_vec, GenDb::NewColVec *out)
 
bool SelectFromTableClusteringKeyRangeFieldNamesSync (const std::string &cfname, const std::vector< GenDb::DbDataValueVec > &rkeys, const GenDb::ColumnNameRange &ck_range, CassConsistency consistency, const GenDb::FieldNamesToReadVec &read_vec, GenDb::ColListVec *out)
 
bool SelectFromTableAsync (const std::string &cfname, const GenDb::DbDataValueVec &rkey, CassConsistency consistency, cass::cql::impl::CassAsyncQueryCallback cb)
 
bool SelectFromTableClusteringKeyRangeAsync (const std::string &cfname, const GenDb::DbDataValueVec &rkey, const GenDb::ColumnNameRange &ck_range, CassConsistency consistency, cass::cql::impl::CassAsyncQueryCallback cb)
 
bool SelectFromTableClusteringKeyRangeAndIndexValueAsync (const std::string &cfname, const GenDb::DbDataValueVec &rkey, const GenDb::ColumnNameRange &ck_range, const GenDb::WhereIndexInfoVec &where_vec, const GenDb::FieldNamesToReadVec &read_vec, CassConsistency consistency, cass::cql::impl::CassAsyncQueryCallback cb)
 
bool ConnectSync ()
 
bool ConnectSchemaSync ()
 
bool DisconnectSync ()
 
bool DisconnectSchemaSync ()
 
void SetRequestTimeout (uint32_t timeout_ms)
 
bool GetMetrics (Metrics *metrics) const
 

Private Types

typedef boost::unordered_map< std::string, impl::CassPreparedPtrCassPreparedMapType
 

Private Member Functions

bool InsertIntoTableInternal (std::auto_ptr< GenDb::ColList > v_columns, CassConsistency consistency, bool sync, impl::CassAsyncQueryCallback cb)
 
bool GetPrepareInsertIntoTable (const std::string &table_name, impl::CassPreparedPtr *prepared) const
 
bool PrepareInsertIntoTableSync (const GenDb::NewCf &cf, impl::CassPreparedPtr *prepared)
 
bool InsertIntoTablePrepareInternal (std::auto_ptr< GenDb::ColList > v_columns, CassConsistency consistency, bool sync, impl::CassAsyncQueryCallback cb)
 

Private Attributes

EventManagerevm_
 
interface::CassLibrarycci_
 
impl::CassClusterPtr cluster_
 
impl::CassSslPtr ssl_
 
impl::CassSessionPtr session_
 
impl::CassSessionPtr schema_session_
 
std::atomic< SessionState::typesession_state_
 
std::atomic< SessionState::typeschema_session_state_
 
std::string schema_contact_point_
 
std::string keyspace_
 
int io_thread_count_
 
CassPreparedMapType insert_prepared_map_
 
std::mutex map_mutex_
 

Static Private Attributes

static const char * kQCreateKeyspaceIfNotExists
 
static const char * kQUseKeyspace
 
static const char * kTaskName
 
static const int kTaskInstance = -1
 

Detailed Description

Definition at line 236 of file cql_if_impl.h.

Member Typedef Documentation

◆ CassPreparedMapType

typedef boost::unordered_map<std::string, impl::CassPreparedPtr> cass::cql::CqlIfImpl::CassPreparedMapType
private

Definition at line 356 of file cql_if_impl.h.

Constructor & Destructor Documentation

◆ CqlIfImpl()

cass::cql::CqlIfImpl::CqlIfImpl ( EventManager evm,
const std::vector< std::string > &  cassandra_ips,
int  cassandra_port,
const std::string &  cassandra_user,
const std::string &  cassandra_password,
bool  use_ssl,
const std::string &  ca_certs_path,
interface::CassLibrary cci 
)

Definition at line 1850 of file cql_if.cc.

Here is the call graph for this function:

◆ ~CqlIfImpl()

cass::cql::CqlIfImpl::~CqlIfImpl ( )
virtual

Definition at line 1908 of file cql_if.cc.

Member Function Documentation

◆ ConnectSchemaSync()

bool cass::cql::CqlIfImpl::ConnectSchemaSync ( )

Definition at line 2285 of file cql_if.cc.

Here is the call graph for this function:

◆ ConnectSync()

bool cass::cql::CqlIfImpl::ConnectSync ( )

Definition at line 2312 of file cql_if.cc.

Here is the call graph for this function:

◆ CreateIndexIfNotExistsSync()

bool cass::cql::CqlIfImpl::CreateIndexIfNotExistsSync ( const std::string &  cfname,
const std::string &  column,
const std::string &  indexname,
CassConsistency  consistency,
const GenDb::ColIndexMode::type  index_mode 
)

Definition at line 2011 of file cql_if.cc.

Here is the call graph for this function:

◆ CreateKeyspaceIfNotExistsSync()

bool cass::cql::CqlIfImpl::CreateKeyspaceIfNotExistsSync ( const std::string &  keyspace,
const std::string &  replication_factor,
CassConsistency  consistency 
)

Definition at line 1915 of file cql_if.cc.

Here is the call graph for this function:

◆ CreateTableIfNotExistsSync()

bool cass::cql::CqlIfImpl::CreateTableIfNotExistsSync ( const GenDb::NewCf cf,
const std::string &  compaction_strategy,
CassConsistency  consistency 
)

Definition at line 1976 of file cql_if.cc.

Here is the call graph for this function:

◆ DisconnectSchemaSync()

bool cass::cql::CqlIfImpl::DisconnectSchemaSync ( )

Definition at line 2346 of file cql_if.cc.

Here is the call graph for this function:

◆ DisconnectSync()

bool cass::cql::CqlIfImpl::DisconnectSync ( )

Definition at line 2333 of file cql_if.cc.

Here is the call graph for this function:

◆ GetMetrics()

bool cass::cql::CqlIfImpl::GetMetrics ( Metrics *  metrics) const

Definition at line 2360 of file cql_if.cc.

Here is the call graph for this function:

◆ GetPrepareInsertIntoTable()

bool cass::cql::CqlIfImpl::GetPrepareInsertIntoTable ( const std::string &  table_name,
impl::CassPreparedPtr prepared 
) const
private

Definition at line 2042 of file cql_if.cc.

◆ InsertIntoTableAsync()

bool cass::cql::CqlIfImpl::InsertIntoTableAsync ( std::auto_ptr< GenDb::ColList v_columns,
CassConsistency  consistency,
impl::CassAsyncQueryCallback  cb 
)

Definition at line 2158 of file cql_if.cc.

Here is the call graph for this function:

◆ InsertIntoTableInternal()

bool cass::cql::CqlIfImpl::InsertIntoTableInternal ( std::auto_ptr< GenDb::ColList v_columns,
CassConsistency  consistency,
bool  sync,
impl::CassAsyncQueryCallback  cb 
)
private

Definition at line 2408 of file cql_if.cc.

Here is the call graph for this function:

◆ InsertIntoTablePrepareAsync()

bool cass::cql::CqlIfImpl::InsertIntoTablePrepareAsync ( std::auto_ptr< GenDb::ColList v_columns,
CassConsistency  consistency,
impl::CassAsyncQueryCallback  cb 
)

Definition at line 2163 of file cql_if.cc.

Here is the call graph for this function:

◆ InsertIntoTablePrepareInternal()

bool cass::cql::CqlIfImpl::InsertIntoTablePrepareInternal ( std::auto_ptr< GenDb::ColList v_columns,
CassConsistency  consistency,
bool  sync,
impl::CassAsyncQueryCallback  cb 
)
private

Definition at line 2462 of file cql_if.cc.

Here is the call graph for this function:

◆ InsertIntoTableSync()

bool cass::cql::CqlIfImpl::InsertIntoTableSync ( std::auto_ptr< GenDb::ColList v_columns,
CassConsistency  consistency 
)

Definition at line 2153 of file cql_if.cc.

Here is the call graph for this function:

◆ IsInsertIntoTablePrepareSupported()

bool cass::cql::CqlIfImpl::IsInsertIntoTablePrepareSupported ( const std::string &  table)

Definition at line 2172 of file cql_if.cc.

Here is the call graph for this function:

◆ IsTableDynamic()

bool cass::cql::CqlIfImpl::IsTableDynamic ( const std::string &  table)

Definition at line 2149 of file cql_if.cc.

Here is the call graph for this function:

◆ IsTablePresent()

bool cass::cql::CqlIfImpl::IsTablePresent ( const std::string &  table)

Definition at line 2054 of file cql_if.cc.

Here is the call graph for this function:

◆ IsTableStatic()

int cass::cql::CqlIfImpl::IsTableStatic ( const std::string &  table)

Definition at line 2062 of file cql_if.cc.

Here is the call graph for this function:

◆ LocatePrepareInsertIntoTable()

bool cass::cql::CqlIfImpl::LocatePrepareInsertIntoTable ( const GenDb::NewCf cf)

Definition at line 2023 of file cql_if.cc.

Here is the call graph for this function:

◆ PrepareInsertIntoTableSync()

bool cass::cql::CqlIfImpl::PrepareInsertIntoTableSync ( const GenDb::NewCf cf,
impl::CassPreparedPtr prepared 
)
private

Definition at line 2432 of file cql_if.cc.

Here is the call graph for this function:

◆ SelectFromTableAsync()

bool cass::cql::CqlIfImpl::SelectFromTableAsync ( const std::string &  cfname,
const GenDb::DbDataValueVec rkey,
CassConsistency  consistency,
cass::cql::impl::CassAsyncQueryCallback  cb 
)

Definition at line 2078 of file cql_if.cc.

Here is the call graph for this function:

◆ SelectFromTableClusteringKeyRangeAndIndexValueAsync()

bool cass::cql::CqlIfImpl::SelectFromTableClusteringKeyRangeAndIndexValueAsync ( const std::string &  cfname,
const GenDb::DbDataValueVec rkey,
const GenDb::ColumnNameRange ck_range,
const GenDb::WhereIndexInfoVec where_vec,
const GenDb::FieldNamesToReadVec read_vec,
CassConsistency  consistency,
cass::cql::impl::CassAsyncQueryCallback  cb 
)

Definition at line 2103 of file cql_if.cc.

Here is the call graph for this function:

◆ SelectFromTableClusteringKeyRangeAsync()

bool cass::cql::CqlIfImpl::SelectFromTableClusteringKeyRangeAsync ( const std::string &  cfname,
const GenDb::DbDataValueVec rkey,
const GenDb::ColumnNameRange ck_range,
CassConsistency  consistency,
cass::cql::impl::CassAsyncQueryCallback  cb 
)

Definition at line 2127 of file cql_if.cc.

Here is the call graph for this function:

◆ SelectFromTableClusteringKeyRangeFieldNamesSync() [1/2]

bool cass::cql::CqlIfImpl::SelectFromTableClusteringKeyRangeFieldNamesSync ( const std::string &  cfname,
const GenDb::DbDataValueVec rkey,
const GenDb::ColumnNameRange ck_range,
CassConsistency  consistency,
const GenDb::FieldNamesToReadVec read_vec,
GenDb::NewColVec out 
)

Definition at line 2226 of file cql_if.cc.

Here is the call graph for this function:

◆ SelectFromTableClusteringKeyRangeFieldNamesSync() [2/2]

bool cass::cql::CqlIfImpl::SelectFromTableClusteringKeyRangeFieldNamesSync ( const std::string &  cfname,
const std::vector< GenDb::DbDataValueVec > &  rkeys,
const GenDb::ColumnNameRange ck_range,
CassConsistency  consistency,
const GenDb::FieldNamesToReadVec read_vec,
GenDb::ColListVec out 
)

Definition at line 2242 of file cql_if.cc.

Here is the call graph for this function:

◆ SelectFromTableClusteringKeyRangeSync()

bool cass::cql::CqlIfImpl::SelectFromTableClusteringKeyRangeSync ( const std::string &  cfname,
const GenDb::DbDataValueVec rkey,
const GenDb::ColumnNameRange ck_range,
CassConsistency  consistency,
GenDb::NewColVec out 
)

Definition at line 2259 of file cql_if.cc.

Here is the call graph for this function:

◆ SelectFromTableSync() [1/2]

bool cass::cql::CqlIfImpl::SelectFromTableSync ( const std::string &  cfname,
CassConsistency  consistency,
GenDb::ColListVec out 
)

Definition at line 2202 of file cql_if.cc.

Here is the call graph for this function:

◆ SelectFromTableSync() [2/2]

bool cass::cql::CqlIfImpl::SelectFromTableSync ( const std::string &  cfname,
const GenDb::DbDataValueVec rkey,
CassConsistency  consistency,
GenDb::NewColVec out 
)

Definition at line 2177 of file cql_if.cc.

Here is the call graph for this function:

◆ SetRequestTimeout()

void cass::cql::CqlIfImpl::SetRequestTimeout ( uint32_t  timeout_ms)

Definition at line 2280 of file cql_if.cc.

Here is the call graph for this function:

◆ UseKeyspaceSync()

bool cass::cql::CqlIfImpl::UseKeyspaceSync ( const std::string &  keyspace,
CassConsistency  consistency 
)

Definition at line 1954 of file cql_if.cc.

Here is the call graph for this function:

◆ UseKeyspaceSyncOnSchemaSession()

bool cass::cql::CqlIfImpl::UseKeyspaceSyncOnSchemaSession ( const std::string &  keyspace,
CassConsistency  consistency 
)

Definition at line 1932 of file cql_if.cc.

Here is the call graph for this function:

Member Data Documentation

◆ cci_

interface::CassLibrary* cass::cql::CqlIfImpl::cci_
private

Definition at line 345 of file cql_if_impl.h.

◆ cluster_

impl::CassClusterPtr cass::cql::CqlIfImpl::cluster_
private

Definition at line 346 of file cql_if_impl.h.

◆ evm_

EventManager* cass::cql::CqlIfImpl::evm_
private

Definition at line 344 of file cql_if_impl.h.

◆ insert_prepared_map_

CassPreparedMapType cass::cql::CqlIfImpl::insert_prepared_map_
private

Definition at line 357 of file cql_if_impl.h.

◆ io_thread_count_

int cass::cql::CqlIfImpl::io_thread_count_
private

Definition at line 354 of file cql_if_impl.h.

◆ keyspace_

std::string cass::cql::CqlIfImpl::keyspace_
private

Definition at line 353 of file cql_if_impl.h.

◆ kQCreateKeyspaceIfNotExists

const char * cass::cql::CqlIfImpl::kQCreateKeyspaceIfNotExists
staticprivate

Definition at line 331 of file cql_if_impl.h.

◆ kQUseKeyspace

const char * cass::cql::CqlIfImpl::kQUseKeyspace
staticprivate

Definition at line 332 of file cql_if_impl.h.

◆ kTaskInstance

const int cass::cql::CqlIfImpl::kTaskInstance = -1
staticprivate

Definition at line 334 of file cql_if_impl.h.

◆ kTaskName

const char * cass::cql::CqlIfImpl::kTaskName
staticprivate

Definition at line 333 of file cql_if_impl.h.

◆ map_mutex_

std::mutex cass::cql::CqlIfImpl::map_mutex_
mutableprivate

Definition at line 358 of file cql_if_impl.h.

◆ schema_contact_point_

std::string cass::cql::CqlIfImpl::schema_contact_point_
private

Definition at line 352 of file cql_if_impl.h.

◆ schema_session_

impl::CassSessionPtr cass::cql::CqlIfImpl::schema_session_
private

Definition at line 349 of file cql_if_impl.h.

◆ schema_session_state_

std::atomic<SessionState::type> cass::cql::CqlIfImpl::schema_session_state_
private

Definition at line 351 of file cql_if_impl.h.

◆ session_

impl::CassSessionPtr cass::cql::CqlIfImpl::session_
private

Definition at line 348 of file cql_if_impl.h.

◆ session_state_

std::atomic<SessionState::type> cass::cql::CqlIfImpl::session_state_
private

Definition at line 350 of file cql_if_impl.h.

◆ ssl_

impl::CassSslPtr cass::cql::CqlIfImpl::ssl_
private

Definition at line 347 of file cql_if_impl.h.


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