MySQL 8.4.0
Source Code Documentation
xcom_cfg.h
Go to the documentation of this file.
1/* Copyright (c) 2016, 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 XCOM_CFG_H
25#define XCOM_CFG_H
26
27#include <stdint.h>
28#include <stdlib.h>
31#include "xdr_gen/xcom_vp.h"
32
33typedef struct cfg_app_xcom {
34 /*
35 The number of spin loops the XCom thread does before
36 blocking on the poll system call.
37 */
38 unsigned int m_poll_spin_loops;
39
40 /*
41 cache size limit and interval
42 */
43 uint64_t m_cache_limit;
44
45 /*
46 The (address, incarnation) pair that uniquely identifies this XCom instance.
47 */
48 node_address *identity;
49
50 /**
51 This is a network namespace manager to deal with network namespace
52 operations
53 */
55
56 /**
57 This is the implementation of XCom_Statistics_Storage_Interface in order to
58 store statistics
59 */
62
63/*
64 The application will set this pointer before engaging
65 xcom
66*/
68
71
72node_address *cfg_app_xcom_get_identity();
73
75
77
78/*
79 Takes ownership of @c identity.
80
81 @param identity The unique identity of this XCom instance. Must not be null.
82*/
83void cfg_app_xcom_set_identity(node_address *identity);
84
85#endif
Class that provides Network Namespace services.
Definition: network_provider.h:242
Interface class for all statistics that XCom will provide.
Definition: statistics_storage_interface.h:33
Definition: xcom_cfg.h:33
Xcom_statistics_storage_interface * statistics_storage
This is the implementation of XCom_Statistics_Storage_Interface in order to store statistics.
Definition: xcom_cfg.h:60
unsigned int m_poll_spin_loops
Definition: xcom_cfg.h:38
Network_namespace_manager * network_ns_manager
This is a network namespace manager to deal with network namespace operations.
Definition: xcom_cfg.h:54
node_address * identity
Definition: xcom_cfg.h:48
uint64_t m_cache_limit
Definition: xcom_cfg.h:43
Xcom_statistics_storage_interface * cfg_app_get_storage_statistics()
Definition: xcom_cfg.cc:71
void init_cfg_app_xcom()
Definition: xcom_cfg.cc:37
Network_namespace_manager * cfg_app_get_network_namespace_manager()
Definition: xcom_cfg.cc:65
cfg_app_xcom_st * the_app_xcom_cfg
Definition: xcom_cfg.cc:33
node_address * cfg_app_xcom_get_identity()
Definition: xcom_cfg.cc:90
struct cfg_app_xcom cfg_app_xcom_st
void deinit_cfg_app_xcom()
Definition: xcom_cfg.cc:48
void cfg_app_xcom_set_identity(node_address *identity)
Definition: xcom_cfg.cc:96