/* * Copyright (C) 2021-present ScyllaDB */ /* * This file is part of Scylla. * * Scylla is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Scylla is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with Scylla. If not, see . */ #pragma once #include #include #include "protocol_server.hh" namespace service { class storage_proxy; class migration_manager; class memory_limiter; } namespace db { class system_distributed_keyspace; class config; } namespace cdc { class generation_service; } namespace gms { class gossiper; } namespace alternator { // This is the official DynamoDB API version. // It represents the last major reorganization of that API, and all the features // that were added since did NOT increment this version string. constexpr const char* version = "2012-08-10"; using namespace seastar; class executor; class server; class controller : public protocol_server { sharded& _gossiper; sharded& _proxy; sharded& _mm; sharded& _sys_dist_ks; sharded& _cdc_gen_svc; sharded& _memory_limiter; const db::config& _config; std::vector _listen_addresses; sharded _executor; sharded _server; std::optional _ssg; public: controller( sharded& gossiper, sharded& proxy, sharded& mm, sharded& sys_dist_ks, sharded& cdc_gen_svc, sharded& memory_limiter, const db::config& config); virtual sstring name() const override; virtual sstring protocol() const override; virtual sstring protocol_version() const override; virtual std::vector listen_addresses() const override; virtual future<> start_server() override; virtual future<> stop_server() override; virtual future<> request_stop_server() override; }; }