MySQL 9.1.0
Source Code Documentation
|
This class represents a set of transaction identifiers. More...
#include <gtidset.h>
Public Types | |
using | Tag = mysql::gtid::Tag |
using | Tsid = mysql::gtid::Tsid |
using | Interval_set = std::set< Gno_interval > |
Tsid_interval_map is a 2-level map between tsids and an ordered set of Gno_intervals. More... | |
using | Tag_interval_map = std::map< Tag, Interval_set > |
using | Tsid_interval_map = std::map< Uuid, Tag_interval_map > |
Public Member Functions | |
Gtid_set ()=default | |
virtual | ~Gtid_set () |
Gtid_set (const Gtid_set &other)=delete | |
Gtid_set & | operator= (const Gtid_set &other) |
Copy assignment. More... | |
virtual bool | operator== (const Gtid_set &other) const |
Compares this set with another one. More... | |
virtual Gtid_format | get_gtid_set_format () const |
Iterates through recorded TSIDs and returns format of the Gtid_set. More... | |
virtual bool | add (const Tsid &tsid, const Gno_interval &interval) |
Adds a new interval indexed by the given uuid. More... | |
virtual const Tsid_interval_map & | get_gtid_set () const |
Gets a copy of the internal set. More... | |
virtual bool | add (const Gtid_set &other) |
Add a set of identifiers to this one. More... | |
virtual std::size_t | get_num_tsids () const |
Get the num TSIDs held in the GTID set. More... | |
virtual bool | add (const Gtid >id) |
Adds the given identifier to this set. More... | |
virtual bool | contains (const Gtid >id) const |
Checks whether this set contains the given identifier. More... | |
virtual std::string | to_string () const |
A human readable representation of this set. More... | |
virtual void | reset () |
Resets this set, making it empty. More... | |
virtual bool | is_empty () const |
Returns true if this is an empty set. More... | |
virtual std::size_t | count () const |
Gets the number of entries in this set. More... | |
Static Public Attributes | |
static const std::string | empty_gtid_set_str {""} |
static const std::string | separator_interval {":"} |
In 'UUID:INTERVAL:INTERVAL', this is the second ':'. More... | |
static const std::string | separator_uuid_set {","} |
In 'SID:GNO,SID:GNO', this is the ','. More... | |
Protected Member Functions | |
virtual bool | do_add (const Tsid &tsid, const Gno_interval &interval) |
virtual bool | do_add (const Uuid &uuid, const Tag &tag, const Gno_interval &interval) |
Protected Attributes | |
Tsid_interval_map | m_gtid_set {} |
An ordered map of entries mapping Uuid to a list of intervals. More... | |
This class represents a set of transaction identifiers.
A set of transaction identifiers contains zero or more entries. When there are multiple entries, there can multiple intervals as well. Different intervals may share the same UUID part or not. This class abstracts that in-memory representation.
using mysql::gtid::Gtid_set::Interval_set = std::set<Gno_interval> |
Tsid_interval_map is a 2-level map between tsids and an ordered set of Gno_intervals.
Uuid is mapped into GTID tags, each pair of Uuid and Tag (TSID) is mapped into ordered set of gno intervals
using mysql::gtid::Gtid_set::Tag_interval_map = std::map<Tag, Interval_set> |
using mysql::gtid::Gtid_set::Tsid_interval_map = std::map<Uuid, Tag_interval_map> |
|
default |
|
virtualdefault |
|
delete |
|
virtual |
Adds the given identifier to this set.
gtid | the identifier to add. |
|
virtual |
Add a set of identifiers to this one.
other | the set to add to this one. |
|
virtual |
Adds a new interval indexed by the given uuid.
|
virtual |
Checks whether this set contains the given identifier.
gtid | the gtid to check whehther it exists in this set or not. |
|
virtual |
Gets the number of entries in this set.
|
protectedvirtual |
|
protectedvirtual |
|
virtual |
Gets a copy of the internal set.
|
virtual |
Iterates through recorded TSIDs and returns format of the Gtid_set.
|
virtual |
Get the num TSIDs held in the GTID set.
|
virtual |
Returns true if this is an empty set.
Copy assignment.
other | the Gtid_set to be copied over to this one. |
|
virtual |
Compares this set with another one.
other | The other set to compare this one with. |
|
virtual |
Resets this set, making it empty.
|
virtual |
A human readable representation of this set.
|
inlinestatic |
|
protected |
An ordered map of entries mapping Uuid to a list of intervals.
|
inlinestatic |
In 'UUID:INTERVAL:INTERVAL', this is the second ':'.
|
inlinestatic |
In 'SID:GNO,SID:GNO', this is the ','.