CatapultServer  v0.5.0.1 (Elephant)
AggregatePtChangeSubscriber.h
Go to the documentation of this file.
1 
21 #pragma once
24 
25 namespace catapult { namespace subscribers {
26 
28  template<typename TPtChangeSubscriber = cache::PtChangeSubscriber>
30  public:
32 
33  public:
34  void notifyAddPartials(const TransactionInfos& transactionInfos) override {
35  this->forEach([&transactionInfos](auto& subscriber) { subscriber.notifyAddPartials(transactionInfos); });
36  }
37 
39  const model::TransactionInfo& parentTransactionInfo,
40  const Key& signer,
41  const Signature& signature) override {
42  this->forEach([&parentTransactionInfo, &signer, &signature](auto& subscriber) {
43  subscriber.notifyAddCosignature(parentTransactionInfo, signer, signature);
44  });
45  }
46 
47  void notifyRemovePartials(const TransactionInfos& transactionInfos) override {
48  this->forEach([&transactionInfos](auto& subscriber) { subscriber.notifyRemovePartials(transactionInfos); });
49  }
50 
51  void flush() override {
52  this->forEach([](auto& subscriber) { subscriber.flush(); });
53  }
54  };
55 }}
catapult::cache::PtChangeSubscriber
Partial transactions change subscriber.
Definition: PtChangeSubscriber.h:28
catapult::subscribers::AggregatePtChangeSubscriber::notifyAddPartials
void notifyAddPartials(const TransactionInfos &transactionInfos) override
Definition: AggregatePtChangeSubscriber.h:34
BasicAggregateSubscriber.h
catapult::model::TransactionInfo
A transaction and its associated metadata.
Definition: EntityInfo.h:104
catapult::subscribers::AggregatePtChangeSubscriber::flush
void flush() override
Flushes all pending partial transactions changes.
Definition: AggregatePtChangeSubscriber.h:51
catapult::subscribers::AggregatePtChangeSubscriber::notifyAddCosignature
void notifyAddCosignature(const model::TransactionInfo &parentTransactionInfo, const Key &signer, const Signature &signature) override
Indicates a cosignature (composed of signer and signature) was added to a partial transaction (parent...
Definition: AggregatePtChangeSubscriber.h:38
catapult::cache::PtChangeSubscriber::TransactionInfos
model::TransactionInfosSet TransactionInfos
Definition: PtChangeSubscriber.h:30
catapult::subscribers::BasicAggregateSubscriber< TPtChangeSubscriber >::forEach
void forEach(TAction action) const
Definition: BasicAggregateSubscriber.h:38
PtChangeSubscriber.h
catapult::subscribers::BasicAggregateSubscriber
Basic aggregate subscriber.
Definition: BasicAggregateSubscriber.h:29
catapult::subscribers::AggregatePtChangeSubscriber
Aggregate partial transactions change subscriber.
Definition: AggregatePtChangeSubscriber.h:29
catapult::subscribers::AggregatePtChangeSubscriber::notifyRemovePartials
void notifyRemovePartials(const TransactionInfos &transactionInfos) override
Definition: AggregatePtChangeSubscriber.h:47
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::utils::ByteArray< Key_Size, Key_tag >