MySQL 8.0.40
Source Code Documentation
|
This class represents a set of transaction identifiers. More...
#include <gtidset.h>
Classes | |
struct | Uuid_comparator |
Public Types | |
typedef std::map< Uuid, std::set< Gno_interval >, Uuid_comparator > | Gno_interval_list |
Gno_interval_list is a map between uuids and an ordered set of Gno_intervals. More... | |
Public Member Functions | |
Gtid_set ()=default | |
virtual | ~Gtid_set () |
Gtid_set (const Gtid_set &other) | |
Construct a new Gtid_set object from the other one provided. More... | |
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 bool | add (const Uuid &uuid, const Gno_interval &interval) |
Adds a new interval indexed by the given uuid. More... | |
virtual const Gno_interval_list & | 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 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 {""} |
static const std::string | SEPARATOR_SEQNO_INTERVALS {":"} |
In 'UUID:INTERVAL:INTERVAL', this is the second ':'. More... | |
static const std::string | SEPARATOR_UUID_SETS {","} |
In 'SID:GNO,SID:GNO', this is the ','. More... | |
Protected Member Functions | |
virtual bool | do_add (const Uuid &uuid, const Gno_interval &interval) |
Protected Attributes | |
Gno_interval_list | 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.
typedef std::map<Uuid, std::set<Gno_interval>, Uuid_comparator> binary_log::gtids::Gtid_set::Gno_interval_list |
Gno_interval_list is a map between uuids and an ordered set of Gno_intervals.
|
default |
|
virtualdefault |
Gtid_set::Gtid_set | ( | const Gtid_set & | other | ) |
Construct a new Gtid_set object from the other one provided.
other | Gtid_set to be copied |
|
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 |
|
virtual |
Gets a copy of the internal 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.
The order is established using the Uuid_comparator.
|
inlinestatic |
In 'UUID:INTERVAL:INTERVAL', this is the second ':'.
|
inlinestatic |
In 'SID:GNO,SID:GNO', this is the ','.