CatapultServer  v0.5.0.1 (Elephant)
catapult::mongo::ApiStateChangeSubscriber Class Reference

Api state change subscriber. More...

Inheritance diagram for catapult::mongo::ApiStateChangeSubscriber:
Collaboration diagram for catapult::mongo::ApiStateChangeSubscriber:

Public Member Functions

 ApiStateChangeSubscriber (std::unique_ptr< ChainScoreProvider > &&pChainScoreProvider, std::unique_ptr< ExternalCacheStorage > &&pCacheStorage)
 Creates a subscriber around pChainScoreProvider and pCacheStorage. More...
 
void notifyScoreChange (const model::ChainScore &chainScore) override
 Indicates chain score was changed to chainScore. More...
 
void notifyStateChange (const subscribers::StateChangeInfo &stateChangeInfo) override
 Indicates state was changed with change information in stateChangeInfo. More...
 
- Public Member Functions inherited from catapult::subscribers::StateChangeSubscriber
virtual ~StateChangeSubscriber ()=default
 

Private Attributes

std::unique_ptr< ChainScoreProviderm_pChainScoreProvider
 
std::unique_ptr< ExternalCacheStoragem_pCacheStorage
 

Detailed Description

Api state change subscriber.

Constructor & Destructor Documentation

◆ ApiStateChangeSubscriber()

catapult::mongo::ApiStateChangeSubscriber::ApiStateChangeSubscriber ( std::unique_ptr< ChainScoreProvider > &&  pChainScoreProvider,
std::unique_ptr< ExternalCacheStorage > &&  pCacheStorage 
)
inline

Creates a subscriber around pChainScoreProvider and pCacheStorage.

Member Function Documentation

◆ notifyScoreChange()

void catapult::mongo::ApiStateChangeSubscriber::notifyScoreChange ( const model::ChainScore chainScore)
inlineoverridevirtual

Indicates chain score was changed to chainScore.

Implements catapult::subscribers::StateChangeSubscriber.

◆ notifyStateChange()

void catapult::mongo::ApiStateChangeSubscriber::notifyStateChange ( const subscribers::StateChangeInfo stateChangeInfo)
inlineoverridevirtual

Indicates state was changed with change information in stateChangeInfo.

Implements catapult::subscribers::StateChangeSubscriber.

Member Data Documentation

◆ m_pCacheStorage

std::unique_ptr<ExternalCacheStorage> catapult::mongo::ApiStateChangeSubscriber::m_pCacheStorage
private

◆ m_pChainScoreProvider

std::unique_ptr<ChainScoreProvider> catapult::mongo::ApiStateChangeSubscriber::m_pChainScoreProvider
private

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