MySQL 26.7.0
Source Code Documentation
log_purge_controller.h
Go to the documentation of this file.
1// Copyright (c) 2026, 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 MYSQL_CSA_RELAY_LOG_LOG_PURGE_CONTROLLER_H
25#define MYSQL_CSA_RELAY_LOG_LOG_PURGE_CONTROLLER_H
26
27#include <functional> // reference_wrapper
28#include <memory>
29#include <string>
30
31namespace mysql::csa {
32
33class Log_purge_controller;
34using Log_purge_controller_ref = std::reference_wrapper<Log_purge_controller>;
35using Log_purge_controller_sptr = std::shared_ptr<Log_purge_controller>;
36
37/// @brief Interface for a relay log controller which is capable of purging
38/// the relay logs
40 public:
41 /// @brief Register log_filename as a log ready to be purged. This function
42 /// will purge registered logs if they are in order according to
43 /// the index file content.
44 /// @param[in] log_filename Registeres this log as a log ready to be purged.
45 /// If registered logs for purging are in order, purges up to log_filename,
46 /// included.
47 /// @retval false Success
48 /// @retval true failure
49 virtual bool concurrent_purge(const std::string &log_filename) = 0;
51};
52
53} // namespace mysql::csa
54
55#endif // MYSQL_CSA_RELAY_LOG_LOG_PURGE_CONTROLLER_H
Interface for a relay log controller which is capable of purging the relay logs.
Definition: log_purge_controller.h:39
virtual bool concurrent_purge(const std::string &log_filename)=0
Register log_filename as a log ready to be purged.
virtual ~Log_purge_controller()
Definition: log_purge_controller.h:50
static const char * log_filename
Definition: myisamlog.cc:97
Definition: channel.cpp:28
std::reference_wrapper< Log_purge_controller > Log_purge_controller_ref
Definition: log_purge_controller.h:34
std::shared_ptr< Log_purge_controller > Log_purge_controller_sptr
Definition: log_purge_controller.h:35