|
drizzle
C++ MySQL-protocol-compatible database server
|
A TransactionApplier that publishes transaction on a zeromq pub socket. More...
#include <zeromq_log.h>
Public Member Functions | |
| ZeroMQLog (const std::string &name, const std::string &endpoint) | |
| Constructs a new ZeroMQLog. | |
| std::string & | getEndpoint () |
| Getter for endpoint. | |
| bool | setEndpoint (std::string new_endpoint) |
| Setter for endpoint. | |
| drizzled::plugin::ReplicationReturnCode | apply (drizzled::Session &session, const drizzled::message::Transaction &to_apply) |
| Serializes the transaction and publishes the message to zmq. | |
| Public Member Functions inherited from drizzled::plugin::TransactionApplier | |
| TransactionApplier (std::string name_arg) | |
| virtual ReplicationReturnCode | apply (Session &in_session, const message::Transaction &to_apply)=0 |
| Public Member Functions inherited from drizzled::plugin::Plugin | |
| Plugin (const std::string &name, const std::string &type_name) | |
| 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 |
Private Member Functions | |
| std::string | getSchemaName (const drizzled::message::Transaction &txn) |
Private Attributes | |
| void * | _socket |
| pthread_mutex_t | publishLock |
| std::string | sysvar_endpoint |
Additional Inherited Members | |
| Public Types inherited from drizzled::plugin::Plugin | |
| 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 Public Member Functions inherited from drizzled::plugin::TransactionApplier | |
| static bool | addPlugin (TransactionApplier &applier) |
| static void | removePlugin (TransactionApplier &applier) |
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.
| drizzle_plugin::zeromq::ZeroMQLog::~ZeroMQLog | ( | ) |
Definition at line 62 of file zeromq_log.cc.
| plugin::ReplicationReturnCode drizzle_plugin::zeromq::ZeroMQLog::apply | ( | drizzled::Session & | session, |
| const drizzled::message::Transaction & | to_apply ) |
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 |
Definition at line 95 of file zeromq_log.cc.
| std::string & drizzle_plugin::zeromq::ZeroMQLog::getEndpoint | ( | ) |
|
private |
Definition at line 129 of file zeromq_log.cc.
| 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.
|
private |
Definition at line 47 of file zeromq_log.h.
|
private |
Definition at line 48 of file zeromq_log.h.
|
private |
Definition at line 49 of file zeromq_log.h.