CatapultServer  v0.5.0.1 (Elephant)
AggregateUtChangeSubscriber.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult { namespace subscribers {
26 
28  template<typename TUtChangeSubscriber = cache::UtChangeSubscriber>
30  public:
32 
33  public:
34  void notifyAdds(const TransactionInfos& transactionInfos) override {
35  this->forEach([&transactionInfos](auto& subscriber) { subscriber.notifyAdds(transactionInfos); });
36  }
37 
38  void notifyRemoves(const TransactionInfos& transactionInfos) override {
39  this->forEach([&transactionInfos](auto& subscriber) { subscriber.notifyRemoves(transactionInfos); });
40  }
41 
42  void flush() override {
43  this->forEach([](auto& subscriber) { subscriber.flush(); });
44  }
45  };
46 }}
catapult::subscribers::AggregateUtChangeSubscriber::notifyRemoves
void notifyRemoves(const TransactionInfos &transactionInfos) override
Indicates transaction infos (transactionInfos) were removed from unconfirmed transactions.
Definition: AggregateUtChangeSubscriber.h:38
BasicAggregateSubscriber.h
catapult::cache::UtChangeSubscriber
Unconfirmed transactions change subscriber.
Definition: UtChangeSubscriber.h:28
catapult::cache::UtChangeSubscriber::TransactionInfos
model::TransactionInfosSet TransactionInfos
Definition: UtChangeSubscriber.h:30
catapult::subscribers::AggregateUtChangeSubscriber::flush
void flush() override
Flushes all pending unconfirmed transactions changes.
Definition: AggregateUtChangeSubscriber.h:42
catapult::subscribers::AggregateUtChangeSubscriber::notifyAdds
void notifyAdds(const TransactionInfos &transactionInfos) override
Indicates transaction infos (transactionInfos) were added to unconfirmed transactions.
Definition: AggregateUtChangeSubscriber.h:34
catapult::subscribers::AggregateUtChangeSubscriber
Aggregate unconfirmed transactions change subscriber.
Definition: AggregateUtChangeSubscriber.h:29
catapult::subscribers::BasicAggregateSubscriber< TUtChangeSubscriber >::forEach
void forEach(TAction action) const
Definition: BasicAggregateSubscriber.h:38
UtChangeSubscriber.h
catapult::subscribers::BasicAggregateSubscriber
Basic aggregate subscriber.
Definition: BasicAggregateSubscriber.h:29
catapult
Definition: AddressExtractionExtension.cpp:28