MySQL 9.3.0
Source Code Documentation
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
content_file_endpoint.h
Go to the documentation of this file.
1/*
2 Copyright (c) 2024, 2025, 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 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 ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_CONTENT_FILE_ENDPOINT_H_
27#define ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_CONTENT_FILE_ENDPOINT_H_
28
29#include <memory>
30
35
36namespace mrs {
37namespace endpoint {
38
39class ContentSetEndpoint;
40
42 public:
46 std::shared_ptr<PersistentDataContentFile>;
48 using ContentFilePtr = std::shared_ptr<ContentFile>;
49 using HandlerFactoryPtr = std::shared_ptr<::mrs::interface::HandlerFactory>;
51
52 public:
55 HandlerFactoryPtr factory);
56
57 OptionalIndexNames get_index_files() override { return {}; }
58 UniversalId get_id() const override;
59 UniversalId get_parent_id() const override;
60 std::optional<std::string> get_options() const override;
61 bool is_index() const;
62
63 const ContentFilePtr get() const;
64 void set(const ContentFile &entry, EndpointBasePtr parent);
65
66 const HandlerPtr &get_handler() const { return handler_; }
67
69 return persistent_data_;
70 }
71
72 protected:
73 void update() override;
74
75 private:
76 void activate_public() override;
77 void activate_private() override;
78 void deactivate() override;
79 void activate_common();
80
82 bool does_this_node_require_authentication() const override;
83 std::string get_my_url_path_part() const override;
84 std::string get_my_url_part() const override;
85
86 bool is_index_{false};
92};
93
94} // namespace endpoint
95} // namespace mrs
96
97#endif // ROUTER_SRC_MYSQL_REST_SERVICE_SRC_MRS_ENDPOINT_CONTENT_FILE_ENDPOINT_H_
Definition: content_file_endpoint.h:41
UniversalId get_id() const override
Definition: content_file_endpoint.cc:49
std::optional< std::string > get_options() const override
Definition: content_file_endpoint.cc:131
bool is_index() const
Definition: content_file_endpoint.cc:135
const PersistentDataContentFilePtr & get_persistent_data() const
Definition: content_file_endpoint.h:68
std::shared_ptr< ContentFile > ContentFilePtr
Definition: content_file_endpoint.h:48
const HandlerPtr & get_handler() const
Definition: content_file_endpoint.h:66
mrs::database::entry::ContentFile ContentFile
Definition: content_file_endpoint.h:47
void activate_public() override
Definition: content_file_endpoint.cc:77
HandlerPtr handler_redirection_
Definition: content_file_endpoint.h:91
std::shared_ptr<::mrs::interface::HandlerFactory > HandlerFactoryPtr
Definition: content_file_endpoint.h:49
void deactivate() override
Definition: content_file_endpoint.cc:109
void update() override
Definition: content_file_endpoint.cc:65
HandlerPtr handler_
Definition: content_file_endpoint.h:90
HandlerFactoryPtr factory_
Definition: content_file_endpoint.h:89
ContentFileEndpoint(const ContentFile &entry, EndpointConfigurationPtr configuration, HandlerFactoryPtr factory)
Definition: content_file_endpoint.cc:42
PersistentDataContentFilePtr persistent_data_
Definition: content_file_endpoint.h:88
const ContentFilePtr get() const
Definition: content_file_endpoint.cc:55
std::shared_ptr< PersistentDataContentFile > PersistentDataContentFilePtr
Definition: content_file_endpoint.h:46
void set(const ContentFile &entry, EndpointBasePtr parent)
Definition: content_file_endpoint.cc:57
std::string get_my_url_path_part() const override
Definition: content_file_endpoint.cc:123
bool is_index_
Definition: content_file_endpoint.h:86
UniversalId get_parent_id() const override
Definition: content_file_endpoint.cc:51
ContentFile DataType
Definition: content_file_endpoint.h:50
bool does_this_node_require_authentication() const override
Definition: content_file_endpoint.cc:119
std::string get_my_url_part() const override
Definition: content_file_endpoint.cc:127
OptionalIndexNames get_index_files() override
Definition: content_file_endpoint.h:57
void activate_common()
Definition: content_file_endpoint.cc:70
EnabledType get_this_node_enabled_level() const override
Definition: content_file_endpoint.cc:115
ContentFilePtr entry_
Definition: content_file_endpoint.h:87
void activate_private() override
Definition: content_file_endpoint.cc:75
Definition: persistent_data_content_file.h:43
Definition: endpoint_base.h:57
std::optional< std::vector< std::string > > OptionalIndexNames
Definition: endpoint_base.h:68
std::shared_ptr< Handler > HandlerPtr
Definition: endpoint_base.h:66
std::shared_ptr< EndpointConfiguration > EndpointConfigurationPtr
Definition: endpoint_base.h:64
mrs::interface::EndpointBase EndpointBase
Definition: handler_factory.cc:61
ContentFileEndpoint::UniversalId UniversalId
Definition: content_file_endpoint.cc:39
ContentFileEndpoint::ContentFile ContentFile
Definition: content_file_endpoint.cc:37
ContentFileEndpoint::EnabledType EnabledType
Definition: content_file_endpoint.cc:40
EndpointFactory::EndpointBasePtr EndpointBasePtr
Definition: endpoint_factory.cc:39
ContentFileEndpoint::ContentFilePtr ContentFilePtr
Definition: content_file_endpoint.cc:38
Definition: authorize_manager.h:48
required string configuration
Definition: replication_asynchronous_connection_failover.proto:49
Definition: completion_hash.h:35