Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
MigrationManagerBase.hpp
1#pragma once
2
3#include "migration/MigrationManagerInterface.hpp"
4#include "migration/impl/MigrationInspectorBase.hpp"
5#include "util/config/ObjectView.hpp"
6
7#include <memory>
8#include <string>
9#include <utility>
10
11namespace migration::impl {
12
19template <typename SupportedMigrators>
21 public MigrationInspectorBase<SupportedMigrators> {
22 // contains only migration related settings
24
25public:
33 std::shared_ptr<typename SupportedMigrators::BackendType> backend,
35 )
36 : MigrationInspectorBase<SupportedMigrators>{std::move(backend)}, config_{std::move(config)}
37 {
38 }
39
45 void
46 runMigration(std::string const& name) override
47 {
48 this->migrators_.runMigrator(name, config_);
49 }
50};
51
52} // namespace migration::impl
MigrationInspectorBase(std::shared_ptr< typename SupportedMigrators::BackendType > backend)
Construct a new Cassandra Migration Inspector object.
Definition MigrationInspectorBase.hpp:31
void runMigration(std::string const &name) override
Run the migration according to the given migrator's name.
Definition MigrationManagerBase.hpp:46
MigrationManagerBase(std::shared_ptr< typename SupportedMigrators::BackendType > backend, util::config::ObjectView config)
Construct a new Cassandra Migration Manager object.
Definition MigrationManagerBase.hpp:32
Provides a view into a subset of configuration data defined by a prefix.
Definition ObjectView.hpp:21
The interface for the migration manager. The migration application layer will use this interface to r...
Definition MigrationManagerInterface.hpp:14