|
| void | populateFilter (std::string input, std::vector< std::string > &filter) |
| bool | isSchemaFiltered (const std::string &schema_name) |
| bool | isTableFiltered (const std::string &table_name) |
| void | parseStatementTableMetadata (const drizzled::message::Statement &in_statement, std::string &in_schema_name, std::string &in_table_name) const |
| void | parseQuery (const std::string &sql, std::string &schema_name, std::string &table_name) |
|
| typedef std::pair< const std::string, const std::string > | map_key |
| typedef std::unique_ptr< plugin::Plugin, deleter_fn > | owned_ptr |
| typedef std::map< const map_key, owned_ptr > | map |
| typedef std::vector< Plugin * > | vector |
| static bool | addPlugin (TransactionReplicator &replicator) |
| static void | removePlugin (TransactionReplicator &replicator) |
Definition at line 43 of file filtered_replicator.h.
◆ FilteredReplicator()
| drizzle_plugin::FilteredReplicator::FilteredReplicator |
( |
std::string | name_arg, |
|
|
const std::string & | sch_filter, |
|
|
const std::string & | tab_filter, |
|
|
const std::string & | sch_regex, |
|
|
const std::string & | tab_regex ) |
◆ ~FilteredReplicator()
| drizzle_plugin::FilteredReplicator::~FilteredReplicator |
( |
| ) |
|
◆ getSchemaFilter()
| const std::string & drizzle_plugin::FilteredReplicator::getSchemaFilter |
( |
| ) |
const |
|
inline |
◆ getTableFilter()
| const std::string & drizzle_plugin::FilteredReplicator::getTableFilter |
( |
| ) |
const |
|
inline |
◆ isSchemaFiltered()
| bool drizzle_plugin::FilteredReplicator::isSchemaFiltered |
( |
const std::string & | schema_name | ) |
|
|
private |
Search the vector of schemas to filter to determine whether the given schema should be filtered or not. The parameter is obtained from the Transaction message passed to the replicator.
- Parameters
-
| [in] | schema_name | name of schema to search for |
- Returns
- true if the given schema should be filtered; false otherwise
Definition at line 319 of file filtered_replicator.cc.
◆ isTableFiltered()
| bool drizzle_plugin::FilteredReplicator::isTableFiltered |
( |
const std::string & | table_name | ) |
|
|
private |
Search the vector of tables to filter to determine whether the given table should be filtered or not. The parameter is obtained from the Transaction message passed to the replicator.
- Parameters
-
| [in] | table_name | name of table to search for |
- Returns
- true if the given table should be filtered; false otherwise
Definition at line 351 of file filtered_replicator.cc.
◆ parseQuery()
| void drizzle_plugin::FilteredReplicator::parseQuery |
( |
const std::string & | sql, |
|
|
std::string & | schema_name, |
|
|
std::string & | table_name ) |
|
private |
If the command message consists of raw SQL, this method parses a string representation of the raw SQL and extracts the schema name and table name from that raw SQL.
- Parameters
-
| [in] | sql | std::string representation of the raw SQL |
| [out] | schema_name | parameter to be populated with the schema name from the parsed SQL |
| [out] | table_name | parameter to be populated with the table name from the parsed SQL |
Definition at line 383 of file filtered_replicator.cc.
◆ parseStatementTableMetadata()
| void drizzle_plugin::FilteredReplicator::parseStatementTableMetadata |
( |
const drizzled::message::Statement & | in_statement, |
|
|
std::string & | in_schema_name, |
|
|
std::string & | in_table_name ) const |
|
private |
Given a supplied Statement message, parse out the table and schema name from the various metadata and header pieces for the different Statement types.
- Parameters
-
| [in] | Statement | to parse |
| [out] | Schema | name to fill |
| [out] | Table | name to fill |
Definition at line 150 of file filtered_replicator.cc.
◆ populateFilter()
| void drizzle_plugin::FilteredReplicator::populateFilter |
( |
std::string | input, |
|
|
std::vector< std::string > & | filter ) |
|
private |
Given a comma-separated string, parse that string to obtain each entry and add each entry to the supplied vector.
- Parameters
-
| [in] | input | a comma-separated string of entries |
| [out] | filter | a std::vector to be populated with the entries from the input string |
Definition at line 300 of file filtered_replicator.cc.
◆ replicate()
Replicate a Transaction message to an Applier.
- Note
It is important to note that memory allocation for the supplied pointer is not guaranteed after the completion of this function – meaning the caller can dispose of the supplied message. Therefore, replicators and appliers implementing an asynchronous replication system must copy the supplied message to their own controlled memory storage area.
- Parameters
-
| Applier | to replicate to |
| Session | descriptor |
| Transaction | message to be replicated |
Definition at line 225 of file filtered_replicator.cc.
◆ setSchemaFilter()
| void drizzle_plugin::FilteredReplicator::setSchemaFilter |
( |
const std::string & | input | ) |
|
Populate the vector of schemas to filter from the comma-separated list of schemas given. This method clears the vector first.
- Parameters
-
| [in] | input | comma-separated filter to use |
Definition at line 481 of file filtered_replicator.cc.
◆ setTableFilter()
| void drizzle_plugin::FilteredReplicator::setTableFilter |
( |
const std::string & | input | ) |
|
Populate the vector of tables to filter from the comma-separated list of tables given. This method clears the vector first.
- Parameters
-
| [in] | input | comma-separated filter to use |
Definition at line 492 of file filtered_replicator.cc.
◆ updateSchemaSysvar()
| void drizzle_plugin::FilteredReplicator::updateSchemaSysvar |
( |
const char ** | var_ptr | ) |
|
|
inline |
Update the given system variable and release the mutex associated with this system variable.
- Parameters
-
| [out] | var_ptr | the system variable to update |
Definition at line 130 of file filtered_replicator.h.
◆ updateTableSysvar()
| void drizzle_plugin::FilteredReplicator::updateTableSysvar |
( |
const char ** | var_ptr | ) |
|
|
inline |
Update the given system variable and release the mutex associated with this system variable.
- Parameters
-
| [out] | var_ptr | the system variable to update |
Definition at line 118 of file filtered_replicator.h.
◆ _sch_filter
| std::string drizzle_plugin::FilteredReplicator::_sch_filter |
|
private |
◆ _sch_regex
| const std::string drizzle_plugin::FilteredReplicator::_sch_regex |
|
private |
◆ _tab_filter
| std::string drizzle_plugin::FilteredReplicator::_tab_filter |
|
private |
◆ _tab_regex
| const std::string drizzle_plugin::FilteredReplicator::_tab_regex |
|
private |
◆ sch_re
| pcre2_code* drizzle_plugin::FilteredReplicator::sch_re |
|
private |
◆ sch_vector_lock
| pthread_mutex_t drizzle_plugin::FilteredReplicator::sch_vector_lock |
|
private |
◆ schemas_to_filter
| std::vector<std::string> drizzle_plugin::FilteredReplicator::schemas_to_filter |
|
private |
◆ sysvar_sch_lock
| pthread_mutex_t drizzle_plugin::FilteredReplicator::sysvar_sch_lock |
|
private |
◆ sysvar_tab_lock
| pthread_mutex_t drizzle_plugin::FilteredReplicator::sysvar_tab_lock |
|
private |
◆ tab_re
| pcre2_code* drizzle_plugin::FilteredReplicator::tab_re |
|
private |
◆ tab_vector_lock
| pthread_mutex_t drizzle_plugin::FilteredReplicator::tab_vector_lock |
|
private |
◆ tables_to_filter
| std::vector<std::string> drizzle_plugin::FilteredReplicator::tables_to_filter |
|
private |
The documentation for this class was generated from the following files: