CatapultServer
v0.5.0.1 (Elephant)
AggregateTransactionStatusSubscriber.h
Go to the documentation of this file.
1
21
#pragma once
22
#include "
BasicAggregateSubscriber.h
"
23
#include "
TransactionStatusSubscriber.h
"
24
25
namespace
catapult
{
namespace
subscribers {
26
28
template
<
typename
TTransactionStatusSubscriber = TransactionStatusSubscriber>
29
class
AggregateTransactionStatusSubscriber
30
:
public
BasicAggregateSubscriber
<TTransactionStatusSubscriber>
31
,
public
TransactionStatusSubscriber
{
32
public
:
33
using
BasicAggregateSubscriber<TTransactionStatusSubscriber>::BasicAggregateSubscriber
;
34
35
public
:
36
void
notifyStatus
(
const
model::Transaction
& transaction,
const
Hash256
& hash, uint32_t status)
override
{
37
this->
forEach
([&transaction, &hash, status](
auto
& subscriber) { subscriber.notifyStatus(transaction, hash, status); });
38
}
39
40
void
flush
()
override
{
41
this->
forEach
([](
auto
& subscriber) { subscriber.flush(); });
42
}
43
};
44
}}
catapult::subscribers::AggregateTransactionStatusSubscriber
Aggregate transaction status subscriber.
Definition:
AggregateTransactionStatusSubscriber.h:29
catapult::subscribers::AggregateTransactionStatusSubscriber::flush
void flush() override
Flushes all queued data.
Definition:
AggregateTransactionStatusSubscriber.h:40
BasicAggregateSubscriber.h
TransactionStatusSubscriber.h
catapult::subscribers::BasicAggregateSubscriber< TTransactionStatusSubscriber >::forEach
void forEach(TAction action) const
Definition:
BasicAggregateSubscriber.h:38
catapult::subscribers::BasicAggregateSubscriber
Basic aggregate subscriber.
Definition:
BasicAggregateSubscriber.h:29
catapult
Definition:
AddressExtractionExtension.cpp:28
catapult::utils::ByteArray< Hash256_Size, Hash256_tag >
catapult::subscribers::AggregateTransactionStatusSubscriber::notifyStatus
void notifyStatus(const model::Transaction &transaction, const Hash256 &hash, uint32_t status) override
Indicates transaction with hash completed with status.
Definition:
AggregateTransactionStatusSubscriber.h:36
catapult::subscribers::TransactionStatusSubscriber
Transaction status subscriber.
Definition:
TransactionStatusSubscriber.h:30
catapult::model::Transaction
Binary layout for a transaction.
Definition:
Transaction.h:32
catapult-server
src
catapult
subscribers
AggregateTransactionStatusSubscriber.h
Generated by
1.8.16