22#include "migration/MigrationInspectorInterface.hpp"
23#include "migration/MigratiorStatus.hpp"
31namespace migration::impl {
39template <
typename SupportedMigrators>
42 SupportedMigrators migrators_;
51 std::shared_ptr<typename SupportedMigrators::BackendType> backend
53 : migrators_{std::move(backend)}
63 std::vector<std::tuple<std::string, MigratorStatus>>
66 return migrators_.getMigratorsStatus();
78 return migrators_.getMigratorStatus(name);
86 std::vector<std::string>
89 auto const names = migrators_.getMigratorNames();
90 return std::vector<std::string>{names.begin(), names.end()};
102 return migrators_.getMigratorDescription(name);
113 return std::ranges::any_of(migrators_.getMigratorNames(), [&](
auto const& migrator) {
114 if (auto canBlock = migrators_.canMigratorBlockClio(migrator); canBlock.has_value() and
116 migrators_.getMigratorStatus(std::string(migrator)) ==
117 MigratorStatus::Status::NotMigrated) {
The status of a migrator, it provides the helper functions to convert the status to string and vice v...
Definition MigratiorStatus.hpp:32
std::vector< std::tuple< std::string, MigratorStatus > > allMigratorsStatusPairs() const override
Get the status of all the migrators.
Definition MigrationInspectorBase.hpp:64
MigrationInspectorBase(std::shared_ptr< typename SupportedMigrators::BackendType > backend)
Construct a new Cassandra Migration Inspector object.
Definition MigrationInspectorBase.hpp:50
bool isBlockingClio() const override
Return if there is incomplete migrator blocking the server.
Definition MigrationInspectorBase.hpp:111
std::string getMigratorDescriptionByName(std::string const &name) const override
Get the description of a migrator by its name.
Definition MigrationInspectorBase.hpp:100
MigratorStatus getMigratorStatusByName(std::string const &name) const override
Get the status of a migrator by its name.
Definition MigrationInspectorBase.hpp:76
std::vector< std::string > allMigratorsNames() const override
Get all registered migrators' names.
Definition MigrationInspectorBase.hpp:87
The interface for the migration inspector.The Clio server application will use this interface to insp...
Definition MigrationInspectorInterface.hpp:34