Public Types | |
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 |
Public Member Functions | |
ReplicationSlave (const std::string &config) | |
void | startup (drizzled::Session &session) |
const std::string & | getError () const |
void | setMaxCommitId (uint64_t value) |
virtual void | shutdownPlugin () |
virtual void | prime () |
void | activate () |
void | deactivate () |
bool | isActive () const |
const std::string & | getName () const |
void | setModule (module::Module *module) |
const std::string & | getTypeName () const |
virtual bool | removeLast () const |
const std::string & | getModuleName () const |
Static Public Member Functions | |
static bool | addPlugin (Daemon *) |
static void | removePlugin (Daemon *) |
Private Member Functions | |
bool | initWithConfig () |
Private Attributes | |
std::string | _config_file |
std::string | _error |
QueueConsumer | _consumer |
QueueProducer | _producer |
boost::thread | _consumer_thread |
boost::thread | _producer_thread |
uint64_t | _initial_max_commit_id |
Definition at line 37 of file replication_slave.h.
static bool drizzled::plugin::Daemon::addPlugin | ( | Daemon * | ) | [inline, static, inherited] |
const std::string& slave::ReplicationSlave::getError | ( | void | ) | const [inline] |
Get the error message describing what went wrong during setup.
Definition at line 58 of file replication_slave.h.
bool slave::ReplicationSlave::initWithConfig | ( | ) | [private] |
Initialize slave services with the given configuration file.
In case of an error during initialization, you can call the getError() method to get a string describing what went wrong.
true | Success |
false | Failure |
Definition at line 53 of file replication_slave.cc.
References slave::ReplicationSchema::setInitialMaxCommitId().
void slave::ReplicationSlave::setMaxCommitId | ( | uint64_t | value | ) | [inline] |
Set the initial value for the slave's maximum commit ID.
This value basically determines where to start retrieving events from the master. Normally this is computed automatically based on the contents of the queue and/or the last applied commit ID. This allows us to override those values and start from another point. E.g., new slave provisioning or skipping a trouble statement.
[in] | value | The commit ID value. |
Definition at line 74 of file replication_slave.h.
boost::thread slave::ReplicationSlave::_consumer_thread [private] |
Applier thread that will drain the work queue
Definition at line 90 of file replication_slave.h.
boost::thread slave::ReplicationSlave::_producer_thread [private] |
I/O thread that will populate the work queue
Definition at line 93 of file replication_slave.h.