MySQL 8.0.39
Source Code Documentation
abstract_progress_reporter.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 ABSTRACT_PROGRESS_REPORTER_INCLUDED
27#define ABSTRACT_PROGRESS_REPORTER_INCLUDED
28
29#include <vector>
30
33
34namespace Mysql {
35namespace Tools {
36namespace Dump {
37
39 public:
40 /**
41 Add new Progress Watcher to report to.
42 */
44 I_progress_watcher *new_progress_watcher) override;
45
46 protected:
47 /**
48 Specifies if have any Progress Watcher registered.
49 */
51
52 /**
53 Reports new non-empty chain being created by Chain Maker or new row
54 fetched from table by Table Reader. Called from Crawler or Table Reader.
55 */
56 void report_new_chain_created(Item_processing_data *new_chain_creator);
57 /**
58 Report new object(table, row or any other) was started processing by
59 specified Object Reader, Table Reader, Formatter or Row Formatter. Reported
60 by these types. Is not reported by queues on enqueue but on dequeue.
61 */
63 /**
64 Report object(table, row or any other) finished being processed. In case of
65 table, this does not necessarily mean that all rows were processed. That
66 does not necessarily mean t3hat object was successfully written by
67 Output Writers.
68 */
70 Item_processing_data *finished_process_data);
71 /**
72 Reports crawler ended enumerating objects and creating chains for them.
73 */
74 virtual void report_crawler_completed(I_crawler *crawler);
75
77
78 private:
79 std::vector<I_progress_watcher *> m_progress_watchers;
80};
81
82} // namespace Dump
83} // namespace Tools
84} // namespace Mysql
85
86#endif
Definition: abstract_progress_reporter.h:38
std::vector< I_progress_watcher * > m_progress_watchers
Definition: abstract_progress_reporter.h:79
void report_object_processing_ended(Item_processing_data *finished_process_data)
Report object(table, row or any other) finished being processed.
Definition: abstract_progress_reporter.cc:59
virtual void report_crawler_completed(I_crawler *crawler)
Reports crawler ended enumerating objects and creating chains for them.
Definition: abstract_progress_reporter.cc:68
bool have_progress_watcher()
Specifies if have any Progress Watcher registered.
Definition: abstract_progress_reporter.cc:37
void report_new_chain_created(Item_processing_data *new_chain_creator)
Reports new non-empty chain being created by Chain Maker or new row fetched from table by Table Reade...
Definition: abstract_progress_reporter.cc:41
void register_progress_watcher(I_progress_watcher *new_progress_watcher) override
Add new Progress Watcher to report to.
Definition: abstract_progress_reporter.cc:32
void register_progress_watchers_in_child(I_progress_reporter *reporter)
Definition: abstract_progress_reporter.cc:76
void report_object_processing_started(Item_processing_data *process_data)
Report new object(table, row or any other) was started processing by specified Object Reader,...
Definition: abstract_progress_reporter.cc:50
Definition: i_crawler.h:36
Definition: i_progress_reporter.h:35
Definition: i_progress_watcher.h:37
Data structure for objects that are processed in any chain.
Definition: item_processing_data.h:43
Definition: abstract_connection_program.h:38