CatapultServer  v0.5.0.1 (Elephant)
Broker.h
Go to the documentation of this file.
1 
21 #pragma once
23 #include <memory>
24 
25 namespace catapult { namespace extensions { class ProcessBootstrapper; } }
26 
27 namespace catapult { namespace local {
28 
30  class Broker : public ProcessHost {};
31 
33  std::unique_ptr<Broker> CreateBroker(std::unique_ptr<extensions::ProcessBootstrapper>&& pBootstrapper);
34 }}
StateChangeReader.h
CATAPULT_LOG
#define CATAPULT_LOG(SEV)
Writes a log entry to the default logger with SEV severity.
Definition: Logging.h:340
FileQueue.h
HostUtils.h
Parser.debug
def debug(*args)
Definition: Parser.py:46
TransactionStatusReader.h
m_pPtChangeSubscriber
std::unique_ptr< cache::PtChangeSubscriber > m_pPtChangeSubscriber
Definition: Broker.cpp:119
catapult::subscribers::ReadNextPtChange
void ReadNextPtChange(io::InputStream &inputStream, cache::PtChangeSubscriber &subscriber)
Reads next partial transactions change from inputStream and forwards it to subscriber.
Definition: PtChangeReader.cpp:55
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
catapult::utils::TimeSpan::FromMilliseconds
static constexpr TimeSpan FromMilliseconds(uint64_t milliseconds)
Creates a time span from the given number of milliseconds.
Definition: TimeSpan.h:59
catapult::config::CatapultDataDirectoryPreparer::Prepare
static CatapultDataDirectory Prepare(const boost::filesystem::path &directory)
Creates a data directory around directory.
Definition: CatapultDataDirectory.h:95
PtChangeReader.h
catapult::local::CreateBroker
std::unique_ptr< Broker > CreateBroker(std::unique_ptr< extensions::ProcessBootstrapper > &&pBootstrapper)
Creates and boots a broker around the specified bootstrapper (pBootstrapper).
Definition: Broker.cpp:127
m_dataDirectory
config::CatapultDataDirectory m_dataDirectory
Definition: Broker.cpp:113
m_pStateChangeSubscriber
std::unique_ptr< subscribers::StateChangeSubscriber > m_pStateChangeSubscriber
Definition: Broker.cpp:121
catapult::thread::CreateUniformDelayGenerator
DelayGenerator CreateUniformDelayGenerator(const utils::TimeSpan &delay)
Creates a uniform delay generator that always returns delay.
Definition: Task.cpp:26
CatapultDataDirectory.h
catapult::subscribers::ReadNextStateChange
void ReadNextStateChange(io::InputStream &inputStream, const CacheChangesStorages &cacheChangesStorages, StateChangeSubscriber &subscriber)
Reads next state change from inputStream and forwards it to subscriber using cacheChangesStorages for...
Definition: StateChangeReader.cpp:63
UtChangeReader.h
catapult::utils::LogLevel::Info
Level for logging informational events.
m_catapultCache
cache::CatapultCache m_catapultCache
Definition: Broker.cpp:115
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
m_pUtChangeSubscriber
std::unique_ptr< cache::UtChangeSubscriber > m_pUtChangeSubscriber
Definition: Broker.cpp:118
m_pBootstrapper
std::unique_ptr< extensions::ProcessBootstrapper > m_pBootstrapper
Definition: Broker.cpp:111
catapult::local::ProcessHost
Catapult process host.
Definition: ProcessHost.h:27
catapult::thread::TaskResult::Continue
Task should repeat.
catapult::thread::Task::Name
std::string Name
Friendly name of the task (optional).
Definition: Task.h:56
forwardsValidation.info
def info(*args)
Definition: forwardsValidation.py:12
m_pluginManager
plugins::PluginManager & m_pluginManager
Definition: Broker.cpp:123
Scheduler.h
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
m_pTransactionStatusSubscriber
std::unique_ptr< subscribers::TransactionStatusSubscriber > m_pTransactionStatusSubscriber
Definition: Broker.cpp:120
BlockChangeReader.h
catapult::utils::StackLogger
Simple RAII class that logs scope messages.
Definition: StackLogger.h:29
catapult::thread::Task::NextDelay
DelayGenerator NextDelay
Generates the delay until the next execution of the task.
Definition: Task.h:50
StackLogger.h
catapult::thread::Task::Callback
TaskCallback Callback
Callback associated with the task.
Definition: Task.h:53
catapult::thread::Task::StartDelay
utils::TimeSpan StartDelay
Delay until the first execution of the task.
Definition: Task.h:47
catapult::thread::make_ready_future
future< T > make_ready_future(T &&value)
Produces a future that is ready immediately and holds the given value.
Definition: Future.h:126
m_pluginModules
std::vector< plugins::PluginModule > m_pluginModules
Definition: Broker.cpp:110
Broker.h
catapult::local::LoadAllPlugins
std::vector< plugins::PluginModule > LoadAllPlugins(extensions::ProcessBootstrapper &bootstrapper)
Loads all plugins using bootstrapper.
Definition: HostUtils.cpp:64
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::local::Broker
Represents a broker.
Definition: Broker.h:30
catapult::subscribers
Definition: DispatcherUtils.h:30
catapult::thread::CreateScheduler
std::shared_ptr< Scheduler > CreateScheduler(const std::shared_ptr< IoThreadPool > &pPool)
Creates a scheduler around the specified thread pool (pPool).
Definition: Scheduler.cpp:213
ProcessBootstrapper.h
catapult::subscribers::ReadNextUtChange
void ReadNextUtChange(io::InputStream &inputStream, cache::UtChangeSubscriber &subscriber)
Reads next unconfirmed transactions change from inputStream and forwards it to subscriber.
Definition: UtChangeReader.cpp:30
catapult::thread::Task
A task that can be dispatched to the scheduler.
Definition: Task.h:45
m_pBlockChangeSubscriber
std::unique_ptr< io::BlockChangeSubscriber > m_pBlockChangeSubscriber
Definition: Broker.cpp:117
BrokerMessageReaders.h
ProcessHost.h