24#ifndef MYSQL_GTID_TSID_H
25#define MYSQL_GTID_TSID_H
82 std::size_t
to_string(
char *out,
const char *tag_sid_separator)
const;
172 std::size_t stream_len,
Representation of the GTID tag.
Definition: tag.h:51
bool is_defined() const
Indicates whether transaction tag is defined (is not empty)
Definition: tag.h:99
static constexpr std::size_t get_max_encoded_length()
Obtains maximum length of encoded tag (compile time)
Definition: tag.h:147
Represents Transaction Source Identifier which is composed of source UUID and transaction tag.
Definition: tsid.h:47
const Tag & get_tag() const
Tag accessor.
Definition: tsid.h:111
bool is_tagged() const
Checks whether this TSID contains tag.
Definition: tsid.h:132
Tsid(Tsid const &)=default
std::string to_string() const
Returns textual representation of Transaction Source Identifier.
Definition: tsid.cpp:34
static constexpr std::size_t get_max_encoded_length()
Obtains maximum length of encoded TSID (compile time)
Definition: tsid.h:149
Uuid m_uuid
GTID UUID.
Definition: tsid.h:176
bool operator!=(const Tsid &other) const
Operator !=.
Definition: tsid.cpp:62
Tsid & operator=(Tsid &&)=default
void clear()
Clears data - uuid and tag.
Definition: tsid.cpp:127
bool operator==(const Tsid &other) const
Operator ==.
Definition: tsid.cpp:58
Tag & get_tag_ref()
Tag accessor, non const (serialization)
Definition: tsid.h:115
Tsid & operator=(Tsid const &)=default
Uuid & get_uuid()
Non const getter is needed in some functions (copy data)
Definition: tsid.h:127
std::size_t encode_tsid(unsigned char *buf, const Gtid_format >id_format) const
stores TSID in buffer
Definition: tsid.cpp:97
Tsid()=default
Constructs empty TSID.
const Uuid & get_uuid() const
UUID accessor.
Definition: tsid.h:123
std::size_t from_cstring(const char *text)
Fills Tsid with data from text.
Definition: tsid.cpp:69
void set_tag(const Tag &tag)
Sets internal tag to a given tag object.
Definition: tsid.h:119
Tag m_tag
GTID Tag.
Definition: tsid.h:177
std::size_t decode_tsid(const unsigned char *stream, std::size_t stream_len, const Gtid_format >id_format)
reads TSID from the buffer
Definition: tsid.cpp:105
bool operator<(const Tsid &other) const
Operator <.
Definition: tsid.cpp:64
static constexpr auto tsid_separator
Default TSID separator.
Definition: tsid.h:91
Definition: buf0block_hint.cc:30
constexpr auto tsid_max_length
Maximum TSID text length (without null character)
Definition: tsid.h:41
Gtid_format
Gtid binary format indicator.
Definition: gtid_format.h:38
constexpr std::size_t tag_max_length
Maximal number of characters in a tag.
Definition: gtid_constants.h:44
#define NODISCARD
The function attribute [[NODISCARD]] is a replacement for [[nodiscard]] to workaround a gcc bug.
Definition: nodiscard.h:47
Structure to compute hash function of a given Tag object.
Definition: tag.h:167
Structure to compute hash function of a given Tag object.
Definition: tsid.h:135
size_t operator()(const Tsid &arg) const
Computes hash of a given Tsid object.
Definition: tsid.h:138
TSID representation so that:
Definition: tsid_plain.h:41
Uuid is a trivial and of standard layout The structure contains the following components.
Definition: uuid.h:64
static const size_t TEXT_LENGTH
The number of bytes in the textual representation of a Uuid.
Definition: uuid.h:168
static constexpr std::size_t BYTE_LENGTH
The number of bytes in the data of a Uuid.
Definition: uuid.h:143