drizzle
C++ MySQL-protocol-compatible database server
Loading...
Searching...
No Matches
drizzle_plugin::logging_gearman::LoggingGearman Class Reference
Inheritance diagram for drizzle_plugin::logging_gearman::LoggingGearman:
[legend]
Collaboration diagram for drizzle_plugin::logging_gearman::LoggingGearman:
[legend]

Public Member Functions

 LoggingGearman (const std::string &host, const std::string &function)
virtual bool post (drizzled::Session *session)
bool setHost (std::string &new_host)
bool setFunction (std::string &new_function)
std::string & getHost ()
std::string & getFunction ()
Public Member Functions inherited from drizzled::plugin::Logging
 Logging (std::string name_arg)
virtual bool pre (Session *)
virtual bool postEnd (Session *)
virtual bool resetGlobalScoreboard ()
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

 LoggingGearman (const LoggingGearman &)

Private Attributes

std::string sysvar_host
std::string sysvar_function
int _gearman_client_ok
gearman_client_st _gearman_client

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::Logging
static bool addPlugin (Logging &handler)
static void removePlugin (Logging &handler)
static bool preDo (Session *session)
static bool postDo (Session *session)
static bool postEndDo (Session *session)
static bool resetStats (Session *session)

Detailed Description

Definition at line 164 of file logging_gearman.cc.

Constructor & Destructor Documentation

◆ LoggingGearman()

drizzle_plugin::logging_gearman::LoggingGearman::LoggingGearman ( const std::string & host,
const std::string & function )
inline

Definition at line 179 of file logging_gearman.cc.

◆ ~LoggingGearman()

drizzle_plugin::logging_gearman::LoggingGearman::~LoggingGearman ( )
inline

Definition at line 211 of file logging_gearman.cc.

Member Function Documentation

◆ getFunction()

std::string & drizzle_plugin::logging_gearman::LoggingGearman::getFunction ( )
inline

Getter for function

Returns
sysvar_function

Definition at line 345 of file logging_gearman.cc.

◆ getHost()

std::string & drizzle_plugin::logging_gearman::LoggingGearman::getHost ( )
inline

Getter for host

Returns
sysvar_host

Definition at line 335 of file logging_gearman.cc.

◆ post()

virtual bool drizzle_plugin::logging_gearman::LoggingGearman::post ( drizzled::Session * session)
inlinevirtual

Reimplemented from drizzled::plugin::Logging.

Definition at line 219 of file logging_gearman.cc.

◆ setFunction()

bool drizzle_plugin::logging_gearman::LoggingGearman::setFunction ( std::string & new_function)
inline

This function changes the gearman function with the new one.

Returns
True on success (as we dont have to do anything except updating the function string, this always return true.)

Definition at line 324 of file logging_gearman.cc.

◆ setHost()

bool drizzle_plugin::logging_gearman::LoggingGearman::setHost ( std::string & new_host)
inline

This function changes the current gearman host to the parameter passed to the function.

Returns
True on success, False on error.

Definition at line 292 of file logging_gearman.cc.

Member Data Documentation

◆ _gearman_client

gearman_client_st drizzle_plugin::logging_gearman::LoggingGearman::_gearman_client
private

Definition at line 172 of file logging_gearman.cc.

◆ _gearman_client_ok

int drizzle_plugin::logging_gearman::LoggingGearman::_gearman_client_ok
private

Definition at line 171 of file logging_gearman.cc.

◆ sysvar_function

std::string drizzle_plugin::logging_gearman::LoggingGearman::sysvar_function
private

Definition at line 169 of file logging_gearman.cc.

◆ sysvar_host

std::string drizzle_plugin::logging_gearman::LoggingGearman::sysvar_host
private

Definition at line 168 of file logging_gearman.cc.


The documentation for this class was generated from the following file: