MXS-1625 Move routing target bits to QueryClassifier

This commit is contained in:
Johan Wikman
2018-04-10 14:24:24 +03:00
parent eafdd61888
commit 91b1ce39b8
4 changed files with 44 additions and 15 deletions

View File

@ -52,6 +52,31 @@ public:
TARGET_RLAG_MAX = 0x10
};
static bool target_is_master(uint32_t t)
{
return (t & TARGET_MASTER);
}
static bool target_is_slave(uint32_t t)
{
return (t & TARGET_SLAVE);
}
static bool target_is_named_server(uint32_t t)
{
return (t & TARGET_NAMED_SERVER);
}
static bool target_is_all(uint32_t t)
{
return (t & TARGET_ALL);
}
static bool target_is_rlag_max(uint32_t t)
{
return (t & TARGET_RLAG_MAX);
}
enum current_target_t
{
CURRENT_TARGET_UNDEFINED, /**< Current target has not been set. */