Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
migration::impl::MigrationInspectorBase< SupportedMigrators > Class Template Reference

The migration inspector implementation for Cassandra. It will report the migration status for Cassandra database. More...

#include <MigrationInspectorBase.hpp>

Inheritance diagram for migration::impl::MigrationInspectorBase< SupportedMigrators >:
Collaboration diagram for migration::impl::MigrationInspectorBase< SupportedMigrators >:

Public Member Functions

 MigrationInspectorBase (std::shared_ptr< typename SupportedMigrators::BackendType > backend)
 Construct a new Cassandra Migration Inspector object.
 
std::vector< std::tuple< std::string, MigratorStatus > > allMigratorsStatusPairs () const override
 Get the status of all the migrators.
 
MigratorStatus getMigratorStatusByName (std::string const &name) const override
 Get the status of a migrator by its name.
 
std::vector< std::string > allMigratorsNames () const override
 Get all registered migrators' names.
 
std::string getMigratorDescriptionByName (std::string const &name) const override
 Get the description of a migrator by its name.
 
bool isBlockingClio () const override
 Return if there is uncomplete migrator blocking the server.
 
- Public Member Functions inherited from migration::MigrationInspectorInterface

Protected Attributes

SupportedMigrators migrators_
 

Detailed Description

template<typename SupportedMigrators>
class migration::impl::MigrationInspectorBase< SupportedMigrators >

The migration inspector implementation for Cassandra. It will report the migration status for Cassandra database.

Template Parameters
SupportedMigratorsThe migrators resgister that contains all the migrators

Constructor & Destructor Documentation

◆ MigrationInspectorBase()

template<typename SupportedMigrators >
migration::impl::MigrationInspectorBase< SupportedMigrators >::MigrationInspectorBase ( std::shared_ptr< typename SupportedMigrators::BackendType > backend)
inlineexplicit

Construct a new Cassandra Migration Inspector object.

Parameters
backendThe backend of the Cassandra database

Member Function Documentation

◆ allMigratorsNames()

template<typename SupportedMigrators >
std::vector< std::string > migration::impl::MigrationInspectorBase< SupportedMigrators >::allMigratorsNames ( ) const
inlineoverridevirtual

Get all registered migrators' names.

Returns
A vector of string, the names of all the migrators

Implements migration::MigrationInspectorInterface.

◆ allMigratorsStatusPairs()

template<typename SupportedMigrators >
std::vector< std::tuple< std::string, MigratorStatus > > migration::impl::MigrationInspectorBase< SupportedMigrators >::allMigratorsStatusPairs ( ) const
inlineoverridevirtual

Get the status of all the migrators.

Returns
A vector of tuple, the first element is the migrator's name, the second element is the status of the migrator

Implements migration::MigrationInspectorInterface.

◆ getMigratorDescriptionByName()

template<typename SupportedMigrators >
std::string migration::impl::MigrationInspectorBase< SupportedMigrators >::getMigratorDescriptionByName ( std::string const & name) const
inlineoverridevirtual

Get the description of a migrator by its name.

Parameters
nameThe name of the migrator
Returns
The description of the migrator

Implements migration::MigrationInspectorInterface.

◆ getMigratorStatusByName()

template<typename SupportedMigrators >
MigratorStatus migration::impl::MigrationInspectorBase< SupportedMigrators >::getMigratorStatusByName ( std::string const & name) const
inlineoverridevirtual

Get the status of a migrator by its name.

Parameters
nameThe name of the migrator
Returns
The status of the migrator

Implements migration::MigrationInspectorInterface.

◆ isBlockingClio()

template<typename SupportedMigrators >
bool migration::impl::MigrationInspectorBase< SupportedMigrators >::isBlockingClio ( ) const
inlineoverridevirtual

Return if there is uncomplete migrator blocking the server.

Returns
True if server is blocked, false otherwise

Implements migration::MigrationInspectorInterface.


The documentation for this class was generated from the following file: