MXS-2302: Rename hintfilter objects
Renamed the objects to camelcase variants.
This commit is contained in:
@ -27,31 +27,31 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// static
|
// static
|
||||||
HINT_INSTANCE* HINT_INSTANCE::create(const char* zName, MXS_CONFIG_PARAMETER* ppParams)
|
HintInstance* HintInstance::create(const char* zName, MXS_CONFIG_PARAMETER* ppParams)
|
||||||
{
|
{
|
||||||
return new(std::nothrow) HINT_INSTANCE;
|
return new(std::nothrow) HintInstance;
|
||||||
}
|
}
|
||||||
|
|
||||||
HINT_SESSION* HINT_INSTANCE::newSession(MXS_SESSION* pSession)
|
HintSession* HintInstance::newSession(MXS_SESSION* pSession)
|
||||||
{
|
{
|
||||||
return new(std::nothrow) HINT_SESSION(pSession);
|
return new(std::nothrow) HintSession(pSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
void HINT_INSTANCE::diagnostics(DCB* pDcb) const
|
void HintInstance::diagnostics(DCB* pDcb) const
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
json_t* HINT_INSTANCE::diagnostics_json() const
|
json_t* HintInstance::diagnostics_json() const
|
||||||
{
|
{
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint64_t HINT_INSTANCE::getCapabilities()
|
uint64_t HintInstance::getCapabilities()
|
||||||
{
|
{
|
||||||
return RCAP_TYPE_CONTIGUOUS_INPUT;
|
return RCAP_TYPE_CONTIGUOUS_INPUT;
|
||||||
}
|
}
|
||||||
|
|
||||||
HINT_SESSION::HINT_SESSION(MXS_SESSION* session)
|
HintSession::HintSession(MXS_SESSION* session)
|
||||||
: mxs::FilterSession(session)
|
: mxs::FilterSession(session)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ HINT_SESSION::HINT_SESSION(MXS_SESSION* session)
|
|||||||
* @param session The filter session
|
* @param session The filter session
|
||||||
* @param queue The query data
|
* @param queue The query data
|
||||||
*/
|
*/
|
||||||
int HINT_SESSION::routeQuery(GWBUF* queue)
|
int HintSession::routeQuery(GWBUF* queue)
|
||||||
{
|
{
|
||||||
if (modutil_is_SQL(queue) && gwbuf_length(queue) > 5)
|
if (modutil_is_SQL(queue) && gwbuf_length(queue) > 5)
|
||||||
{
|
{
|
||||||
@ -97,7 +97,7 @@ extern "C"
|
|||||||
"A hint parsing filter",
|
"A hint parsing filter",
|
||||||
"V1.0.0",
|
"V1.0.0",
|
||||||
RCAP_TYPE_CONTIGUOUS_INPUT,
|
RCAP_TYPE_CONTIGUOUS_INPUT,
|
||||||
&HINT_INSTANCE::s_object,
|
&HintInstance::s_object,
|
||||||
NULL, /* Process init. */
|
NULL, /* Process init. */
|
||||||
NULL, /* Process finish. */
|
NULL, /* Process finish. */
|
||||||
NULL, /* Thread init. */
|
NULL, /* Thread init. */
|
||||||
|
@ -412,7 +412,7 @@ HintParser::~HintParser()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void HINT_SESSION::process_hints(GWBUF* buffer)
|
void HintSession::process_hints(GWBUF* buffer)
|
||||||
{
|
{
|
||||||
mxs::Buffer buf(buffer);
|
mxs::Buffer buf(buffer);
|
||||||
HINT* hint = m_parser.parse(std::next(buf.begin(), 5), buf.end());
|
HINT* hint = m_parser.parse(std::next(buf.begin(), 5), buf.end());
|
||||||
|
@ -16,16 +16,16 @@
|
|||||||
#include <maxscale/hint.h>
|
#include <maxscale/hint.h>
|
||||||
#include <maxscale/filter.hh>
|
#include <maxscale/filter.hh>
|
||||||
|
|
||||||
class HINT_SESSION;
|
class HintSession;
|
||||||
|
|
||||||
class HINT_INSTANCE : public mxs::Filter<HINT_INSTANCE, HINT_SESSION>
|
class HintInstance : public mxs::Filter<HintInstance, HintSession>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
static HINT_INSTANCE* create(const char* zName, MXS_CONFIG_PARAMETER* ppParams);
|
static HintInstance* create(const char* zName, MXS_CONFIG_PARAMETER* ppParams);
|
||||||
HINT_SESSION* newSession(MXS_SESSION* pSession);
|
HintSession* newSession(MXS_SESSION* pSession);
|
||||||
void diagnostics(DCB* pDcb) const;
|
void diagnostics(DCB* pDcb) const;
|
||||||
json_t* diagnostics_json() const;
|
json_t* diagnostics_json() const;
|
||||||
uint64_t getCapabilities();
|
uint64_t getCapabilities();
|
||||||
};
|
};
|
||||||
|
|
||||||
enum TOKEN_VALUE
|
enum TOKEN_VALUE
|
||||||
@ -79,13 +79,13 @@ private:
|
|||||||
HINT* parse_one(InputIter begin, InputIter end);
|
HINT* parse_one(InputIter begin, InputIter end);
|
||||||
};
|
};
|
||||||
|
|
||||||
class HINT_SESSION : public mxs::FilterSession
|
class HintSession : public mxs::FilterSession
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
HINT_SESSION(const HINT_SESSION&) = delete;
|
HintSession(const HintSession&) = delete;
|
||||||
HINT_SESSION& operator=(const HINT_SESSION&) = delete;
|
HintSession& operator=(const HintSession&) = delete;
|
||||||
|
|
||||||
HINT_SESSION(MXS_SESSION* session);
|
HintSession(MXS_SESSION* session);
|
||||||
int routeQuery(GWBUF* queue);
|
int routeQuery(GWBUF* queue);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Reference in New Issue
Block a user