A TransactionApplier that publishes transaction on a zeromq pub socket. More...
#include <zeromq_log.h>
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 | |
| ZeroMQLog (const std::string &name, const std::string &endpoint) | |
| Constructs a new ZeroMQLog. More... | |
| std::string & | getEndpoint () |
| Getter for endpoint. More... | |
| bool | setEndpoint (std::string new_endpoint) |
| Setter for endpoint. More... | |
| drizzled::plugin::ReplicationReturnCode | apply (drizzled::Session &session, const drizzled::message::Transaction &to_apply) |
| Serializes the transaction and publishes the message to zmq. More... | |
| virtual void | shutdownPlugin () |
| virtual void | prime () |
| virtual void | startup (drizzled::Session &) |
| 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 (TransactionApplier *applier) |
| static void | removePlugin (TransactionApplier *applier) |
Private Member Functions | |
| std::string | getSchemaName (const drizzled::message::Transaction &txn) |
Private Attributes | |
| void * | _socket |
| pthread_mutex_t | publishLock |
| std::string | sysvar_endpoint |
A TransactionApplier that publishes transaction on a zeromq pub socket.
sends messages to a pub socket
Definition at line 43 of file zeromq_log.h.
| drizzle_plugin::zeromq::ZeroMQLog::ZeroMQLog | ( | const std::string & | name, |
| const std::string & | endpoint | ||
| ) |
Constructs a new ZeroMQLog.
| [in] | name | of plugin |
| [in] | the | endpoint string (typically tcp:// *:9999) (no space actually, compiler whines about comment within comment..) |
Definition at line 50 of file zeromq_log.cc.
|
virtual |
Serializes the transaction and publishes the message to zmq.
Serializes the protobuf transaction and drops it on zmq
| [in] | to_apply | the transaction to send |
Implements drizzled::plugin::TransactionApplier.
Definition at line 95 of file zeromq_log.cc.
| std::string & drizzle_plugin::zeromq::ZeroMQLog::getEndpoint | ( | ) |
| bool drizzle_plugin::zeromq::ZeroMQLog::setEndpoint | ( | std::string | new_endpoint | ) |
Setter for endpoint.
This function is called to change the value of sysvar_endpoint
| [in] | new | endpoint string |
Definition at line 73 of file zeromq_log.cc.