CatapultServer  v0.5.0.1 (Elephant)
RecoveryOrchestrator.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include <memory>
24 
25 namespace catapult {
26  namespace extensions { class ProcessBootstrapper; }
27  namespace model { class ChainScore; }
28 }
29 
30 namespace catapult { namespace local {
31 
34  public:
36  virtual model::ChainScore score() const = 0;
37  };
38 
40  std::unique_ptr<RecoveryOrchestrator> CreateRecoveryOrchestrator(std::unique_ptr<extensions::ProcessBootstrapper>&& pBootstrapper);
41 }}
m_pStateChangeSubscriber
std::unique_ptr< subscribers::StateChangeSubscriber > m_pStateChangeSubscriber
Definition: RecoveryOrchestrator.cpp:250
CATAPULT_LOG
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
RecoveryOrchestrator.h
m_pluginManager
plugins::PluginManager & m_pluginManager
Definition: RecoveryOrchestrator.cpp:252
RepairSpooling.h
HostUtils.h
CATAPULT_THROW_RUNTIME_ERROR_2
#define CATAPULT_THROW_RUNTIME_ERROR_2(MESSAGE, PARAM1, PARAM2)
Macro used to throw a catapult runtime error with two parameters.
Definition: exceptions.h:175
Parser.debug
def debug(*args)
Definition: Parser.py:46
catapult::consumers::CommitOperationStep::State_Written
State was written to disk.
TransactionStatusReader.h
m_pBootstrapper
std::unique_ptr< extensions::ProcessBootstrapper > m_pBootstrapper
Definition: RecoveryOrchestrator.cpp:237
m_dataDirectory
config::CatapultDataDirectory m_dataDirectory
Definition: RecoveryOrchestrator.cpp:241
catapult::Height
utils::BaseValue< uint64_t, Height_tag > Height
Definition: src/catapult/types.h:85
catapult::subscribers::ReadAll
void ReadAll(io::InputStream &inputStream, TSubscriber &subscriber, TMessageReader readNextMessage)
Reads all messages from inputStream into subscriber using readNextMessage.
Definition: BrokerMessageReaders.h:49
MoveBlockFiles.h
catapult::local::CreateRecoveryOrchestrator
std::unique_ptr< RecoveryOrchestrator > CreateRecoveryOrchestrator(std::unique_ptr< extensions::ProcessBootstrapper > &&pBootstrapper)
Creates and boots a recovery orchestrator around the specified bootstrapper (pBootstrapper).
Definition: RecoveryOrchestrator.cpp:256
catapult::utils::to_underlying_type
constexpr std::underlying_type_t< TEnum > to_underlying_type(TEnum value)
Converts a strongly typed enumeration value to its underlying integral value.
Definition: Casting.h:37
catapult::extensions::SaveStateToDirectoryWithCheckpointing
void SaveStateToDirectoryWithCheckpointing(const config::CatapultDataDirectory &dataDirectory, const config::NodeConfiguration &nodeConfig, const cache::CatapultCache &cache, const state::CatapultState &state, const model::ChainScore &score)
Serializes state composed of cache, state and score with checkpointing to dataDirectory given nodeCon...
Definition: LocalNodeStateFileStorage.cpp:192
m_subscriber1
subscribers::StateChangeSubscriber & m_subscriber1
Definition: RecoveryOrchestrator.cpp:67
m_catapultState
state::CatapultState m_catapultState
Definition: RecoveryOrchestrator.cpp:244
catapult::local::LoadBlockChain
model::ChainScore LoadBlockChain(const BlockDependentNotificationObserverFactory &observerFactory, const plugins::PluginManager &pluginManager, const extensions::LocalNodeStateRef &stateRef, Height startHeight)
Definition: MultiBlockLoader.cpp:178
CatapultDataDirectory.h
catapult::model::ChainScore
Definition: ChainScore.h:30
catapult::local::FindStartHeight
Height FindStartHeight(const io::BlockStorage &storage)
Returns starting height of storage.
Definition: StorageStart.cpp:26
m_config
const config::CatapultConfiguration & m_config
Definition: RecoveryOrchestrator.cpp:240
m_pluginModules
std::vector< plugins::PluginModule > m_pluginModules
Definition: RecoveryOrchestrator.cpp:236
MultiBlockLoader.h
m_subscriber2
subscribers::StateChangeSubscriber & m_subscriber2
Definition: RecoveryOrchestrator.cpp:68
catapult::utils::LogLevel::Info
Level for logging informational events.
Score
model::ChainScore Score
Definition: BlockChainSyncConsumer.cpp:43
catapult::io::MoveBlockFiles
void MoveBlockFiles(PrunableBlockStorage &sourceStorage, BlockStorage &destinationStorage, Height startHeight)
Moves block files starting at startHeight from sourceStorage to destinationStorage.
Definition: MoveBlockFiles.cpp:28
catapult::local::RepairState
void RepairState(const config::CatapultDirectory &stateChangeDirectory, const cache::CatapultCache &catapultCache, subscribers::StateChangeSubscriber &registeredSubscriber, subscribers::StateChangeSubscriber &repairSubscriber)
Definition: RepairState.cpp:75
RecoveryStorageAdapter.h
catapult::local::CreateReadOnlyStorageAdapter
std::unique_ptr< io::BlockStorage > CreateReadOnlyStorageAdapter(const io::BlockStorage &storage)
Creates non-owning read-only storage around storage.
Definition: RecoveryStorageAdapter.cpp:66
catapult::subscribers::ReadNextTransactionStatus
void ReadNextTransactionStatus(io::InputStream &inputStream, TransactionStatusSubscriber &subscriber)
Reads next transaction status from inputStream and forwards it to subscriber.
Definition: TransactionStatusReader.cpp:29
catapult::extensions::LoadStateFromDirectory
StateHeights LoadStateFromDirectory(const config::CatapultDirectory &directory, const LocalNodeStateRef &stateRef, const plugins::PluginManager &pluginManager)
Loads catapult state into stateRef from directory given pluginManager.
Definition: LocalNodeStateFileStorage.cpp:96
catapult::io::FileBlockStorageMode::None
None.
m_pBlockStorage
std::unique_ptr< io::BlockStorage > m_pBlockStorage
Definition: RecoveryOrchestrator.cpp:245
StateChangeRepairingSubscriber.h
catapult::local::ProcessHost
Catapult process host.
Definition: ProcessHost.h:27
RepairState.h
forwardsValidation.info
def info(*args)
Definition: forwardsValidation.py:12
catapult::subscribers::ReadNextBlockChange
void ReadNextBlockChange(io::InputStream &inputStream, io::BlockChangeSubscriber &subscriber)
Reads next block change from inputStream and forwards it to subscriber.
Definition: BlockChangeReader.cpp:50
BlockChangeReader.h
catapult::local::RepairSpooling
void RepairSpooling(const config::CatapultDataDirectory &dataDirectory, consumers::CommitOperationStep commitStep)
Repairs catapult spooling folders inside dataDirectory given last server commit operation step that s...
Definition: RepairSpooling.cpp:68
catapult::io::PurgeDirectory
void PurgeDirectory(const std::string &directory)
Deletes everything in directory but does not delete the directory itself.
Definition: FilesystemUtils.cpp:26
m_catapultCache
cache::CatapultCache m_catapultCache
Definition: RecoveryOrchestrator.cpp:243
StackLogger.h
StorageStart.h
m_storage
io::BlockStorageCache m_storage
Definition: RecoveryOrchestrator.cpp:246
LocalNodeStateRef.h
catapult::local::CreateStateChangeRepairingSubscriber
std::unique_ptr< subscribers::StateChangeSubscriber > CreateStateChangeRepairingSubscriber(cache::CatapultCache &cache, extensions::LocalNodeChainScore &localNodeScore)
Creates state change repairing subscriber around cache and localNodeScore.
Definition: StateChangeRepairingSubscriber.cpp:58
CatapultSystemState.h
ChainScore
model::ChainScore ChainScore
Definition: tools/health/main.cpp:43
catapult::local::LoadAllPlugins
std::vector< plugins::PluginModule > LoadAllPlugins(extensions::ProcessBootstrapper &bootstrapper)
Loads all plugins using bootstrapper.
Definition: HostUtils.cpp:64
catapult::consumers::CommitOperationStep
CommitOperationStep
Steps in a commit operation.
Definition: BlockChainSyncHandlers.h:62
catapult
Definition: AddressExtractionExtension.cpp:28
m_pBlockChangeSubscriber
io::BlockChangeSubscriber * m_pBlockChangeSubscriber
Definition: RecoveryOrchestrator.cpp:239
LocalNodeChainScore.h
catapult::local::RecoveryOrchestrator::score
virtual model::ChainScore score() const =0
Gets the current chain score.
LocalNodeStateFileStorage.h
catapult::local::RecoveryOrchestrator
Represents a recovery orchestrator.
Definition: RecoveryOrchestrator.h:33
m_score
extensions::LocalNodeChainScore m_score
Definition: RecoveryOrchestrator.cpp:247
BlockStorageCache.h
FilesystemUtils.h
ProcessBootstrapper.h
m_pTransactionStatusSubscriber
std::unique_ptr< subscribers::TransactionStatusSubscriber > m_pTransactionStatusSubscriber
Definition: RecoveryOrchestrator.cpp:249
BrokerMessageReaders.h
ProcessHost.h