MySQL 9.6.0
Source Code Documentation
mysql::gtids::detail::Gtid_interface< Tsid_tp > Class Template Reference

Base class for classes representing a single Gtid, parameterized by the type of the Tsid. More...

#include <gtid.h>

Inheritance diagram for mysql::gtids::detail::Gtid_interface< Tsid_tp >:
[legend]

Public Member Functions

 Gtid_interface ()=default
 Construct a new, uninitialized object. More...
 
 Gtid_interface (const Is_gtid auto &gtid)
 Construct a new object by copying the given Gtid. More...
 
const auto & tsid () const
 Return const reference to the Tsid. More...
 
auto & tsid ()
 Return non-const reference to the Tsid. More...
 
const auto & uuid () const
 Return const reference to the Uuid. More...
 
auto & uuid ()
 Return non-const reference to the Uuid. More...
 
const auto & tag () const
 Return const reference to the Tag. More...
 
auto & tag ()
 Return non-const reference to the Tag. More...
 
Sequence_number get_sequence_number () const
 Return the Sequence_number. More...
 
void throwing_set_sequence_number (const Sequence_number &sequence_number)
 Set and validate the Sequence_number. More...
 
auto set_sequence_number (const Sequence_number &sequence_number)
 Set and validate the Sequence_number. More...
 
auto assign (const Is_gtid auto &other)
 Copy from other to this. More...
 

Protected Member Functions

 Gtid_interface (const mysql::uuids::Uuid &uuid, const Is_tag auto &tag, Sequence_number sequence_number)
 Construct a new object from the given Uuid, Tag, and Sequence_number. More...
 
 Gtid_interface (const mysql::uuids::Uuid &uuid, Sequence_number sequence_number)
 Construct a new object from the given Uuid and Sequence_number, using an empty tag. More...
 
 Gtid_interface (const Is_tsid auto &tsid, Sequence_number sequence_number)
 Construct a new object from the given Tsid and Sequence_number. More...
 

Private Member Functions

void assert_sequence_number (Sequence_number sequence_number) const
 Assert that the sequence number is in range. More...
 

Private Attributes

Tsid_tp m_tsid
 The Tsid object. More...
 
Sequence_number m_sequence_number
 The Sequence_number. More...
 

Detailed Description

template<Is_tsid Tsid_tp>
class mysql::gtids::detail::Gtid_interface< Tsid_tp >

Base class for classes representing a single Gtid, parameterized by the type of the Tsid.

Constructor & Destructor Documentation

◆ Gtid_interface() [1/5]

template<Is_tsid Tsid_tp>
mysql::gtids::detail::Gtid_interface< Tsid_tp >::Gtid_interface ( const mysql::uuids::Uuid uuid,
const Is_tag auto &  tag,
Sequence_number  sequence_number 
)
inlineexplicitprotected

Construct a new object from the given Uuid, Tag, and Sequence_number.

Exceptions
std::domain_errorif the given number is out of range.

◆ Gtid_interface() [2/5]

template<Is_tsid Tsid_tp>
mysql::gtids::detail::Gtid_interface< Tsid_tp >::Gtid_interface ( const mysql::uuids::Uuid uuid,
Sequence_number  sequence_number 
)
inlineexplicitprotected

Construct a new object from the given Uuid and Sequence_number, using an empty tag.

Exceptions
std::domain_errorif the given number is out of range.

◆ Gtid_interface() [3/5]

template<Is_tsid Tsid_tp>
mysql::gtids::detail::Gtid_interface< Tsid_tp >::Gtid_interface ( const Is_tsid auto &  tsid,
Sequence_number  sequence_number 
)
inlineexplicitprotected

Construct a new object from the given Tsid and Sequence_number.

Exceptions
std::domain_errorif the given number is out of range.

◆ Gtid_interface() [4/5]

template<Is_tsid Tsid_tp>
mysql::gtids::detail::Gtid_interface< Tsid_tp >::Gtid_interface ( )
default

Construct a new, uninitialized object.

Note that this must not initialize any members because we need the subclass Gtid_trivial to satisfy std::is_trivially_default_constructible.

◆ Gtid_interface() [5/5]

template<Is_tsid Tsid_tp>
mysql::gtids::detail::Gtid_interface< Tsid_tp >::Gtid_interface ( const Is_gtid auto &  gtid)
inlineexplicit

Construct a new object by copying the given Gtid.

Member Function Documentation

◆ assert_sequence_number()

template<Is_tsid Tsid_tp>
void mysql::gtids::detail::Gtid_interface< Tsid_tp >::assert_sequence_number ( Sequence_number  sequence_number) const
inlineprivate

Assert that the sequence number is in range.

Exceptions
std::domain_errorif the given number is out of range.

◆ assign()

template<Is_tsid Tsid_tp>
auto mysql::gtids::detail::Gtid_interface< Tsid_tp >::assign ( const Is_gtid auto &  other)
inline

Copy from other to this.

Returns
Currently void. If we introduce allocating tag types, the allocation may fail, in which case this will return Return_status.

◆ get_sequence_number()

template<Is_tsid Tsid_tp>
Sequence_number mysql::gtids::detail::Gtid_interface< Tsid_tp >::get_sequence_number ( ) const
inline

Return the Sequence_number.

◆ set_sequence_number()

template<Is_tsid Tsid_tp>
auto mysql::gtids::detail::Gtid_interface< Tsid_tp >::set_sequence_number ( const Sequence_number sequence_number)
inline

Set and validate the Sequence_number.

Returns
ok on success; error if the given number is out of range.

◆ tag() [1/2]

template<Is_tsid Tsid_tp>
auto & mysql::gtids::detail::Gtid_interface< Tsid_tp >::tag ( )
inline

Return non-const reference to the Tag.

◆ tag() [2/2]

template<Is_tsid Tsid_tp>
const auto & mysql::gtids::detail::Gtid_interface< Tsid_tp >::tag ( ) const
inline

Return const reference to the Tag.

◆ throwing_set_sequence_number()

template<Is_tsid Tsid_tp>
void mysql::gtids::detail::Gtid_interface< Tsid_tp >::throwing_set_sequence_number ( const Sequence_number sequence_number)
inline

Set and validate the Sequence_number.

Exceptions
std::domain_errorif the given number is out of range.

◆ tsid() [1/2]

template<Is_tsid Tsid_tp>
auto & mysql::gtids::detail::Gtid_interface< Tsid_tp >::tsid ( )
inline

Return non-const reference to the Tsid.

◆ tsid() [2/2]

template<Is_tsid Tsid_tp>
const auto & mysql::gtids::detail::Gtid_interface< Tsid_tp >::tsid ( ) const
inline

Return const reference to the Tsid.

◆ uuid() [1/2]

template<Is_tsid Tsid_tp>
auto & mysql::gtids::detail::Gtid_interface< Tsid_tp >::uuid ( )
inline

Return non-const reference to the Uuid.

◆ uuid() [2/2]

template<Is_tsid Tsid_tp>
const auto & mysql::gtids::detail::Gtid_interface< Tsid_tp >::uuid ( ) const
inline

Return const reference to the Uuid.

Member Data Documentation

◆ m_sequence_number

template<Is_tsid Tsid_tp>
Sequence_number mysql::gtids::detail::Gtid_interface< Tsid_tp >::m_sequence_number
private

The Sequence_number.

This must not be initialized by default, because this is a base class for of Gtid_trivial, and initializing it would make Gtid_trivial violate std::is_trivially_default_constructible.

◆ m_tsid

template<Is_tsid Tsid_tp>
Tsid_tp mysql::gtids::detail::Gtid_interface< Tsid_tp >::m_tsid
private

The Tsid object.


The documentation for this class was generated from the following file: