MySQL
8.0.40
Source Code Documentation
item_processing_data.h
Go to the documentation of this file.
1
/*
2
Copyright (c) 2015, 2024, Oracle and/or its affiliates.
3
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License, version 2.0,
6
as published by the Free Software Foundation.
7
8
This program is designed to work with certain software (including
9
but not limited to OpenSSL) that is licensed under separate terms,
10
as designated in a particular file or component or in included license
11
documentation. The authors of MySQL hereby grant you an additional
12
permission to link the program and your derivative works with the
13
separately licensed software that they have either included with
14
the program or referenced in the documentation.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
GNU General Public License, version 2.0, for more details.
20
21
You should have received a copy of the GNU General Public License
22
along with this program; if not, write to the Free Software
23
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
24
*/
25
26
#ifndef ITEM_PROCESSING_DATA_INCLUDED
27
#define ITEM_PROCESSING_DATA_INCLUDED
28
29
#include <atomic>
30
#include <functional>
31
32
#include "
client/dump/chain_data.h
"
33
#include "
client/dump/i_chain_element.h
"
34
#include "
client/dump/i_dump_task.h
"
35
36
namespace
Mysql
{
37
namespace
Tools {
38
namespace
Dump {
39
40
/**
41
Data structure for objects that are processed in any chain.
42
*/
43
class
Item_processing_data
{
44
public
:
45
Item_processing_data
(
46
Chain_data
*chain_data,
I_dump_task
*process_task_object,
47
I_chain_element
*chain_element,
48
const
std::function<
void
(
Item_processing_data
*)> *completion_callback,
49
Item_processing_data
*parent_item_data);
50
51
~Item_processing_data
();
52
53
/**
54
Returns chain data in which this item is being processed.
55
*/
56
Chain_data
*
get_chain
()
const
;
57
58
Item_processing_data
*
get_parent_item_data
()
const
;
59
60
void
start_processing
();
61
62
bool
end_processing
();
63
64
I_dump_task
*
get_process_task_object
()
const
;
65
66
I_chain_element
*
get_processing_chain_element
()
const
;
67
68
bool
have_completion_callback
();
69
70
bool
had_chain_created
()
const
;
71
72
void
set_had_chain_created
();
73
74
void
set_chain
(
Chain_data
*);
75
76
bool
call_completion_callback_at_end
();
77
78
private
:
79
/**
80
Chain in which current processing item is processed.
81
*/
82
Chain_data
*
m_chain_data
;
83
/**
84
Instance of task object that is being processing.
85
*/
86
I_dump_task
*
m_process_task_object
;
87
/**
88
Instance of chain element that is processing specified element.
89
*/
90
I_chain_element
*
m_chain_element
;
91
/**
92
Callback to call after element is fully processed to the output. Can be
93
NULL.
94
*/
95
const
std::function<void(
Item_processing_data
*)> *
m_completion_callback
;
96
/**
97
Link to item process information of parent module execution, if exists.
98
*/
99
Item_processing_data
*
m_parent_item_data
;
100
/**
101
Number of modules that have pending or are executing this task.
102
*/
103
std::atomic<uint32_t>
m_active_executions
;
104
/**
105
Indicates if this item led to creation of at least one new chain.
106
*/
107
bool
m_had_chain_created
;
108
};
109
110
}
// namespace Dump
111
}
// namespace Tools
112
}
// namespace Mysql
113
114
#endif
chain_data.h
Mysql::Tools::Dump::Chain_data
Definition:
chain_data.h:35
Mysql::Tools::Dump::I_chain_element
Interface for all objects that can process data in any part of dump process.
Definition:
i_chain_element.h:41
Mysql::Tools::Dump::I_dump_task
Interface for all individual dump process tasks.
Definition:
i_dump_task.h:38
Mysql::Tools::Dump::Item_processing_data
Data structure for objects that are processed in any chain.
Definition:
item_processing_data.h:43
Mysql::Tools::Dump::Item_processing_data::set_had_chain_created
void set_had_chain_created()
Definition:
item_processing_data.cc:82
Mysql::Tools::Dump::Item_processing_data::m_completion_callback
const std::function< void(Item_processing_data *)> * m_completion_callback
Callback to call after element is fully processed to the output.
Definition:
item_processing_data.h:95
Mysql::Tools::Dump::Item_processing_data::have_completion_callback
bool have_completion_callback()
Definition:
item_processing_data.cc:74
Mysql::Tools::Dump::Item_processing_data::m_active_executions
std::atomic< uint32_t > m_active_executions
Number of modules that have pending or are executing this task.
Definition:
item_processing_data.h:103
Mysql::Tools::Dump::Item_processing_data::get_processing_chain_element
I_chain_element * get_processing_chain_element() const
Definition:
item_processing_data.cc:70
Mysql::Tools::Dump::Item_processing_data::get_chain
Chain_data * get_chain() const
Returns chain data in which this item is being processed.
Definition:
item_processing_data.cc:51
Mysql::Tools::Dump::Item_processing_data::had_chain_created
bool had_chain_created() const
Definition:
item_processing_data.cc:78
Mysql::Tools::Dump::Item_processing_data::m_parent_item_data
Item_processing_data * m_parent_item_data
Link to item process information of parent module execution, if exists.
Definition:
item_processing_data.h:99
Mysql::Tools::Dump::Item_processing_data::Item_processing_data
Item_processing_data(Chain_data *chain_data, I_dump_task *process_task_object, I_chain_element *chain_element, const std::function< void(Item_processing_data *)> *completion_callback, Item_processing_data *parent_item_data)
Definition:
item_processing_data.cc:33
Mysql::Tools::Dump::Item_processing_data::set_chain
void set_chain(Chain_data *)
Definition:
item_processing_data.cc:86
Mysql::Tools::Dump::Item_processing_data::m_process_task_object
I_dump_task * m_process_task_object
Instance of task object that is being processing.
Definition:
item_processing_data.h:86
Mysql::Tools::Dump::Item_processing_data::m_had_chain_created
bool m_had_chain_created
Indicates if this item led to creation of at least one new chain.
Definition:
item_processing_data.h:107
Mysql::Tools::Dump::Item_processing_data::start_processing
void start_processing()
Definition:
item_processing_data.cc:57
Mysql::Tools::Dump::Item_processing_data::get_parent_item_data
Item_processing_data * get_parent_item_data() const
Definition:
item_processing_data.cc:53
Mysql::Tools::Dump::Item_processing_data::m_chain_element
I_chain_element * m_chain_element
Instance of chain element that is processing specified element.
Definition:
item_processing_data.h:90
Mysql::Tools::Dump::Item_processing_data::m_chain_data
Chain_data * m_chain_data
Chain in which current processing item is processed.
Definition:
item_processing_data.h:82
Mysql::Tools::Dump::Item_processing_data::~Item_processing_data
~Item_processing_data()
Definition:
item_processing_data.cc:46
Mysql::Tools::Dump::Item_processing_data::end_processing
bool end_processing()
Definition:
item_processing_data.cc:59
Mysql::Tools::Dump::Item_processing_data::get_process_task_object
I_dump_task * get_process_task_object() const
Definition:
item_processing_data.cc:66
Mysql::Tools::Dump::Item_processing_data::call_completion_callback_at_end
bool call_completion_callback_at_end()
Definition:
item_processing_data.cc:90
i_chain_element.h
i_dump_task.h
Mysql
Definition:
abstract_connection_program.h:38
client
dump
item_processing_data.h
Generated by
1.9.2