MySQL 8.1.0
Source Code Documentation
xcom_cfg.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 2023, 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 also distributed 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 included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23#ifndef XCOM_CFG_H
24#define XCOM_CFG_H
25
26#include <stdint.h>
27#include <stdlib.h>
30#include "xdr_gen/xcom_vp.h"
31
32typedef struct cfg_app_xcom {
33 /*
34 The number of spin loops the XCom thread does before
35 blocking on the poll system call.
36 */
37 unsigned int m_poll_spin_loops;
38
39 /*
40 cache size limit and interval
41 */
42 uint64_t m_cache_limit;
43
44 /*
45 The (address, incarnation) pair that uniquely identifies this XCom instance.
46 */
47 node_address *identity;
48
49 /**
50 This is a network namespace manager to deal with network namespace
51 operations
52 */
54
55 /**
56 This is the implementation of XCom_Statistics_Storage_Interface in order to
57 store statistics
58 */
61
62/*
63 The application will set this pointer before engaging
64 xcom
65*/
67
70
71node_address *cfg_app_xcom_get_identity();
72
74
76
77/*
78 Takes ownership of @c identity.
79
80 @param identity The unique identity of this XCom instance. Must not be null.
81*/
82void cfg_app_xcom_set_identity(node_address *identity);
83
84#endif
Class that provides Network Namespace services.
Definition: network_provider.h:215
Interface class for all statistics that XCom will provide.
Definition: statistics_storage_interface.h:32
Definition: xcom_cfg.h:32
Xcom_statistics_storage_interface * statistics_storage
This is the implementation of XCom_Statistics_Storage_Interface in order to store statistics.
Definition: xcom_cfg.h:59
unsigned int m_poll_spin_loops
Definition: xcom_cfg.h:37
Network_namespace_manager * network_ns_manager
This is a network namespace manager to deal with network namespace operations.
Definition: xcom_cfg.h:53
node_address * identity
Definition: xcom_cfg.h:47
uint64_t m_cache_limit
Definition: xcom_cfg.h:42
Xcom_statistics_storage_interface * cfg_app_get_storage_statistics()
Definition: xcom_cfg.cc:70
void init_cfg_app_xcom()
Definition: xcom_cfg.cc:36
Network_namespace_manager * cfg_app_get_network_namespace_manager()
Definition: xcom_cfg.cc:64
cfg_app_xcom_st * the_app_xcom_cfg
Definition: xcom_cfg.cc:32
node_address * cfg_app_xcom_get_identity()
Definition: xcom_cfg.cc:89
struct cfg_app_xcom cfg_app_xcom_st
void deinit_cfg_app_xcom()
Definition: xcom_cfg.cc:47
void cfg_app_xcom_set_identity(node_address *identity)
Definition: xcom_cfg.cc:95