|
typedef std::pair< const std::string, const std::string > | map_key |
|
typedef std::map< const map_key, plugin::Plugin * > | map |
|
typedef std::vector< Plugin * > | vector |
|
|
static bool | addPlugin (TransactionReplicator *replicator) |
|
static void | removePlugin (TransactionReplicator *replicator) |
|
|
std::vector< std::string > | schemas_to_filter |
|
std::vector< std::string > | tables_to_filter |
|
std::string | _sch_filter |
|
std::string | _tab_filter |
|
const std::string | _sch_regex |
|
const std::string | _tab_regex |
|
pthread_mutex_t | sch_vector_lock |
|
pthread_mutex_t | tab_vector_lock |
|
pthread_mutex_t | sysvar_sch_lock |
|
pthread_mutex_t | sysvar_tab_lock |
|
pcre * | sch_re |
|
pcre * | tab_re |
|
Definition at line 43 of file filtered_replicator.h.
drizzle_plugin::FilteredReplicator::~FilteredReplicator |
( |
| ) |
|
const std::string& drizzle_plugin::FilteredReplicator::getSchemaFilter |
( |
| ) |
const |
|
inline |
const std::string& drizzle_plugin::FilteredReplicator::getTableFilter |
( |
| ) |
const |
|
inline |
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 317 of file filtered_replicator.cc.
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 343 of file filtered_replicator.cc.
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 369 of file filtered_replicator.cc.
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
-
Definition at line 148 of file filtered_replicator.cc.
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 298 of file filtered_replicator.cc.
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 |
Implements drizzled::plugin::TransactionReplicator.
Definition at line 223 of file filtered_replicator.cc.
References drizzled::plugin::TransactionApplier::apply().
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 467 of file filtered_replicator.cc.
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 478 of file filtered_replicator.cc.
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.
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.
The documentation for this class was generated from the following files: