CatapultServer
v0.5.0.1 (Elephant)
|
A manager for subscribing to notifications. More...
Public Member Functions | |
SubscriptionManager (const config::CatapultConfiguration &config) | |
Creates a new subscription manager around config. More... | |
io::BlockStorage & | fileStorage () |
Gets the underlying file storage. More... | |
void | addBlockChangeSubscriber (std::unique_ptr< io::BlockChangeSubscriber > &&pSubscriber) |
Registers a block change subscriber (pSubscriber). More... | |
void | addUtChangeSubscriber (std::unique_ptr< cache::UtChangeSubscriber > &&pSubscriber) |
Registers an unconfirmed transactions change subscriber (pSubscriber). More... | |
void | addPtChangeSubscriber (std::unique_ptr< cache::PtChangeSubscriber > &&pSubscriber) |
Registers a partial transactions change subscriber (pSubscriber). More... | |
void | addTransactionStatusSubscriber (std::unique_ptr< TransactionStatusSubscriber > &&pSubscriber) |
Adds a transaction status subscriber (pSubscriber). More... | |
void | addStateChangeSubscriber (std::unique_ptr< StateChangeSubscriber > &&pSubscriber) |
Adds a state change subscriber (pSubscriber). More... | |
void | addNodeSubscriber (std::unique_ptr< NodeSubscriber > &&pSubscriber) |
Adds a node subscriber (pSubscriber). More... | |
std::unique_ptr< io::BlockChangeSubscriber > | createBlockChangeSubscriber () |
Creates the block change subscriber. More... | |
std::unique_ptr< cache::UtChangeSubscriber > | createUtChangeSubscriber () |
Creates the ut change subscriber. More... | |
std::unique_ptr< cache::PtChangeSubscriber > | createPtChangeSubscriber () |
Creates the pt change subscriber. More... | |
std::unique_ptr< TransactionStatusSubscriber > | createTransactionStatusSubscriber () |
Creates the transaction status subscriber. More... | |
std::unique_ptr< StateChangeSubscriber > | createStateChangeSubscriber () |
Creates the state change subscriber. More... | |
std::unique_ptr< NodeSubscriber > | createNodeSubscriber () |
Creates the node subscriber. More... | |
std::unique_ptr< io::BlockStorage > | createBlockStorage (io::BlockChangeSubscriber *&pSubscriber) |
std::unique_ptr< cache::MemoryUtCacheProxy > | createUtCache (const cache::MemoryCacheOptions &options) |
std::unique_ptr< cache::MemoryPtCacheProxy > | createPtCache (const cache::MemoryCacheOptions &options) |
Private Member Functions | |
void | requireUnused (SubscriberType subscriberType) const |
void | markUsed (SubscriberType subscriberType) |
Private Attributes | |
const config::CatapultConfiguration & | m_config |
std::unique_ptr< io::FileBlockStorage > | m_pStorage |
std::array< bool, utils::to_underlying_type(SubscriberType::Count)> | m_subscriberUsedFlags |
std::vector< std::unique_ptr< io::BlockChangeSubscriber > > | m_blockChangeSubscribers |
std::vector< std::unique_ptr< cache::UtChangeSubscriber > > | m_utChangeSubscribers |
std::vector< std::unique_ptr< cache::PtChangeSubscriber > > | m_ptChangeSubscribers |
std::vector< std::unique_ptr< TransactionStatusSubscriber > > | m_transactionStatusSubscribers |
std::vector< std::unique_ptr< StateChangeSubscriber > > | m_stateChangeSubscribers |
std::vector< std::unique_ptr< NodeSubscriber > > | m_nodeSubscribers |
A manager for subscribing to notifications.
|
strongprivate |
|
explicit |
Creates a new subscription manager around config.
void catapult::subscribers::SubscriptionManager::addBlockChangeSubscriber | ( | std::unique_ptr< io::BlockChangeSubscriber > && | pSubscriber | ) |
Registers a block change subscriber (pSubscriber).
void catapult::subscribers::SubscriptionManager::addNodeSubscriber | ( | std::unique_ptr< NodeSubscriber > && | pSubscriber | ) |
Adds a node subscriber (pSubscriber).
void catapult::subscribers::SubscriptionManager::addPtChangeSubscriber | ( | std::unique_ptr< cache::PtChangeSubscriber > && | pSubscriber | ) |
Registers a partial transactions change subscriber (pSubscriber).
void catapult::subscribers::SubscriptionManager::addStateChangeSubscriber | ( | std::unique_ptr< StateChangeSubscriber > && | pSubscriber | ) |
Adds a state change subscriber (pSubscriber).
void catapult::subscribers::SubscriptionManager::addTransactionStatusSubscriber | ( | std::unique_ptr< TransactionStatusSubscriber > && | pSubscriber | ) |
Adds a transaction status subscriber (pSubscriber).
void catapult::subscribers::SubscriptionManager::addUtChangeSubscriber | ( | std::unique_ptr< cache::UtChangeSubscriber > && | pSubscriber | ) |
Registers an unconfirmed transactions change subscriber (pSubscriber).
std::unique_ptr< io::BlockChangeSubscriber > catapult::subscribers::SubscriptionManager::createBlockChangeSubscriber | ( | ) |
Creates the block change subscriber.
std::unique_ptr< io::BlockStorage > catapult::subscribers::SubscriptionManager::createBlockStorage | ( | io::BlockChangeSubscriber *& | pSubscriber | ) |
Creates the block storage and sets pSubscriber to the created block change subscriber.
std::unique_ptr< NodeSubscriber > catapult::subscribers::SubscriptionManager::createNodeSubscriber | ( | ) |
Creates the node subscriber.
std::unique_ptr< cache::MemoryPtCacheProxy > catapult::subscribers::SubscriptionManager::createPtCache | ( | const cache::MemoryCacheOptions & | options | ) |
Creates the partial transactions cache with the specified cache options.
std::unique_ptr< cache::PtChangeSubscriber > catapult::subscribers::SubscriptionManager::createPtChangeSubscriber | ( | ) |
Creates the pt change subscriber.
std::unique_ptr< StateChangeSubscriber > catapult::subscribers::SubscriptionManager::createStateChangeSubscriber | ( | ) |
Creates the state change subscriber.
std::unique_ptr< TransactionStatusSubscriber > catapult::subscribers::SubscriptionManager::createTransactionStatusSubscriber | ( | ) |
Creates the transaction status subscriber.
std::unique_ptr< cache::MemoryUtCacheProxy > catapult::subscribers::SubscriptionManager::createUtCache | ( | const cache::MemoryCacheOptions & | options | ) |
Creates the unconfirmed transactions cache with the specified cache options.
std::unique_ptr< cache::UtChangeSubscriber > catapult::subscribers::SubscriptionManager::createUtChangeSubscriber | ( | ) |
Creates the ut change subscriber.
io::BlockStorage & catapult::subscribers::SubscriptionManager::fileStorage | ( | ) |
Gets the underlying file storage.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |