MXS-2196: Preload DCB entry points in Listener

By loading the entry points required by a DCB when the Listener is
created, the extra cost of finding the module is removed. It also
simplifies DCB creation by removing the possibility of all failures to
load modules at DCB creation time.
This commit is contained in:
Markus Mäkelä
2018-11-30 12:41:12 +02:00
parent c858f7f080
commit 9c679edea6
3 changed files with 40 additions and 64 deletions

View File

@ -124,6 +124,16 @@ public:
*/
const char* protocol() const;
/**
* The protocol module entry points
*/
const MXS_PROTOCOL& protocol_func() const;
/**
* The authenticator module entry points
*/
const MXS_AUTHENTICATOR& auth_func() const;
/**
* The authenticator instance
*/
@ -180,6 +190,8 @@ private:
struct users* m_users; /**< The user data for this listener */
SERVICE* m_service; /**< The service which used by this listener */
std::atomic<bool> m_active; /**< True if the port has not been deleted */
MXS_PROTOCOL m_proto_func; /**< Preloaded protocol functions */
MXS_AUTHENTICATOR m_auth_func; /**< Preloaded authenticator functions */
/**
* Creates a new listener that points to a service