mirror of
https://github.com/codership/wsrep-lib.git
synced 2025-04-19 21:02:17 +03:00
29 lines
535 B
C++
29 lines
535 B
C++
//
|
|
// Copyright (C) 2018 Codership Oy <info@codership.com>
|
|
//
|
|
|
|
#ifndef WSREP_CLIENT_ID_HPP
|
|
#define WSREP_CLIENT_ID_HPP
|
|
|
|
namespace wsrep
|
|
{
|
|
class client_id
|
|
{
|
|
public:
|
|
typedef unsigned long long type;
|
|
client_id()
|
|
: id_(-1)
|
|
{ }
|
|
template <typename I>
|
|
client_id(I id)
|
|
: id_(static_cast<type>(id))
|
|
{ }
|
|
type get() const { return id_; }
|
|
static type invalid() { return -1; }
|
|
private:
|
|
type id_;
|
|
};
|
|
}
|
|
|
|
#endif // WSREP_CLIENT_ID_HPP
|