Clio  develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
CassandraMigrationManager.hpp
1#pragma once
2
3#include "data/BackendInterface.hpp"
4#include "migration/cassandra/CassandraMigrationBackend.hpp"
5#include "migration/impl/MigrationInspectorBase.hpp"
6#include "migration/impl/MigrationManagerBase.hpp"
7#include "migration/impl/MigratorsRegister.hpp"
8
9namespace {
10
11// Register migrators here
12// MigratorsRegister<BackendType, ExampleMigrator>
13template <typename BackendType>
14using CassandraSupportedMigrators = migration::impl::MigratorsRegister<BackendType>;
15
16// Instantiates with the backend which supports actual migration running
17using MigrationProcessor =
18 CassandraSupportedMigrators<migration::cassandra::CassandraMigrationBackend>;
19
20// Instantiates with backend interface, it doesn't support actual migration. But it can be used to
21// inspect the migrators status
22using MigrationQuerier = CassandraSupportedMigrators<data::BackendInterface>;
23
24} // namespace
25
26namespace migration::cassandra {
27
28using CassandraMigrationInspector = migration::impl::MigrationInspectorBase<MigrationQuerier>;
29
30using CassandraMigrationManager = migration::impl::MigrationManagerBase<MigrationProcessor>;
31
32} // namespace migration::cassandra
The register of migrators. It will dispatch the migration to the corresponding migrator....
Definition MigratorsRegister.hpp:50