MySQL 9.1.0
Source Code Documentation
gcs_xcom_view_identifier.h
Go to the documentation of this file.
1/* Copyright (c) 2015, 2024, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is designed to work with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have either included with
13 the program or referenced in the documentation.
14
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License, version 2.0, for more details.
19
20 You should have received a copy of the GNU General Public License
21 along with this program; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
23
24#ifndef GCS_XCOM_VIEW_IDENTIFIER_INCLUDED
25#define GCS_XCOM_VIEW_IDENTIFIER_INCLUDED
26
27#include <stdint.h>
28#include <string>
29
32
34 public:
35 explicit Gcs_xcom_view_identifier(uint64_t fixed_part_arg,
36 uint32_t monotonic_part_arg);
37
39
40 uint64_t get_fixed_part() const { return m_fixed_part; }
41
42 uint32_t get_monotonic_part() const { return m_monotonic_part; }
43
44 void increment_by_one();
45
46 const std::string &get_representation() const override;
47
48 Gcs_view_identifier *clone() const override;
49
50 private:
51 void init(uint64_t fixed_part_arg, uint32_t monotonic_part_arg);
52 bool equals(const Gcs_view_identifier &other) const override;
53 bool lessThan(const Gcs_view_identifier &other) const override;
54
55 uint64_t m_fixed_part;
57 std::string m_representation;
58};
59
60#endif /* GCS_XCOM_VIEW_IDENTIFIER_INCLUDED */
This represents the identification of a certain view of a certain group in a moment in time.
Definition: gcs_view_identifier.h:44
Definition: gcs_xcom_view_identifier.h:33
void increment_by_one()
Definition: gcs_xcom_view_identifier.cc:46
bool equals(const Gcs_view_identifier &other) const override
Definition: gcs_xcom_view_identifier.cc:59
void init(uint64_t fixed_part_arg, uint32_t monotonic_part_arg)
Definition: gcs_xcom_view_identifier.cc:34
std::string m_representation
Definition: gcs_xcom_view_identifier.h:57
bool lessThan(const Gcs_view_identifier &other) const override
Definition: gcs_xcom_view_identifier.cc:67
Gcs_view_identifier * clone() const override
Returns a copy of this object.
Definition: gcs_xcom_view_identifier.cc:55
uint64_t m_fixed_part
Definition: gcs_xcom_view_identifier.h:55
Gcs_xcom_view_identifier(const Gcs_xcom_view_identifier &)=default
uint64_t get_fixed_part() const
Definition: gcs_xcom_view_identifier.h:40
const std::string & get_representation() const override
Returns a normalized representation of the DTO.
Definition: gcs_xcom_view_identifier.cc:51
Gcs_xcom_view_identifier(uint64_t fixed_part_arg, uint32_t monotonic_part_arg)
Definition: gcs_xcom_view_identifier.cc:28
uint32_t get_monotonic_part() const
Definition: gcs_xcom_view_identifier.h:42
uint32_t m_monotonic_part
Definition: gcs_xcom_view_identifier.h:56