20#include "ignite/common/end_point.h"
21#include "ignite/common/uuid.h"
33 cluster_node() =
default;
44 , m_name(std::move(name))
45 , m_address(std::move(address)) {}
52 [[nodiscard]]
const uuid &
get_id()
const {
return m_id; }
59 [[nodiscard]]
const std::string &
get_name()
const {
return m_name; }
75 [[nodiscard]]
int compare(
const cluster_node &other)
const {
76 auto name_comp = m_name.compare(other.m_name);
80 auto id_comp = m_id.compare(other.m_id);
84 return m_address.compare(other.m_address);
95 end_point m_address{};
106 return val1.
compare(val2) == 0;
117 return !(val1 == val2);
128 return val1.compare(val2) < 0;
139 return val1.compare(val2) <= 0;
150 return val1.compare(val2) > 0;
161 return val1.compare(val2) >= 0;
Definition cluster_node.h:30
const uuid & get_id() const
Definition cluster_node.h:52
int compare(const cluster_node &other) const
Definition cluster_node.h:75
const end_point & get_address() const
Definition cluster_node.h:66
const std::string & get_name() const
Definition cluster_node.h:59
cluster_node(uuid id, std::string name, end_point address)
Definition cluster_node.h:42
Universally unique identifier (UUID).
Definition uuid.h:32
constexpr int compare(const uuid &other) const noexcept
Definition uuid.h:109
Definition end_point.h:28