CatapultServer  v0.5.0.1 (Elephant)
CatapultSystemState.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult { namespace local {
26 
29  public:
31  explicit CatapultSystemState(const config::CatapultDataDirectory& dataDirectory);
32 
33  public:
35  bool shouldRecoverBroker() const;
36 
38  bool shouldRecoverServer() const;
39 
42 
43  public:
45  void reset();
46 
47  private:
48  std::string qualifyRootFile(const std::string& filename) const;
49 
50  private:
52  };
53 }}
catapult::io::IndexFile::get
uint64_t get() const
Gets the index value.
Definition: IndexFile.cpp:36
catapult::local::CatapultSystemState::reset
void reset()
Resets system state to indicate no crash.
Definition: CatapultSystemState.cpp:50
catapult::io::IndexFile
Index file containing a uint64_t value.
Definition: IndexFile.h:28
catapult::local::CatapultSystemState::shouldRecoverBroker
bool shouldRecoverBroker() const
true if broker should be recovered.
Definition: CatapultSystemState.cpp:35
catapult::config::CatapultDataDirectory
Catapult data directory.
Definition: CatapultDataDirectory.h:61
catapult::local::CatapultSystemState::qualifyRootFile
std::string qualifyRootFile(const std::string &filename) const
Definition: CatapultSystemState.cpp:55
catapult::local::CatapultSystemState::m_dataDirectory
config::CatapultDataDirectory m_dataDirectory
Definition: CatapultSystemState.h:51
catapult::local::CatapultSystemState
Catapult system state.
Definition: CatapultSystemState.h:28
catapult::config::CatapultDirectory::file
std::string file(const std::string &name) const
Gets the path for the file with name.
Definition: CatapultDataDirectory.h:48
catapult::config::CatapultDataDirectory::rootDir
CatapultDirectory rootDir() const
Gets the root data directory.
Definition: CatapultDataDirectory.h:69
CatapultDataDirectory.h
catapult::local::CatapultSystemState::CatapultSystemState
CatapultSystemState(const config::CatapultDataDirectory &dataDirectory)
Creates state around dataDirectory.
Definition: CatapultSystemState.cpp:32
catapult::consumers::CommitOperationStep::All_Updated
Everything was updated.
IndexFile.h
catapult::local::CatapultSystemState::commitStep
consumers::CommitOperationStep commitStep() const
Last server commit operation step that succeeded.
Definition: CatapultSystemState.cpp:43
CatapultSystemState.h
catapult::io::IndexFile::exists
bool exists() const
true if the index file exists.
Definition: IndexFile.cpp:32
catapult::consumers::CommitOperationStep
CommitOperationStep
Steps in a commit operation.
Definition: BlockChainSyncHandlers.h:62
catapult
Definition: AddressExtractionExtension.cpp:28
m_dataDirectory
config::CatapultDataDirectory m_dataDirectory
Definition: FileSpoolingExtension.cpp:44
BlockChainSyncHandlers.h
catapult::local::CatapultSystemState::shouldRecoverServer
bool shouldRecoverServer() const
true if server should be recovered.
Definition: CatapultSystemState.cpp:39