CatapultServer  v0.5.0.1 (Elephant)
DisruptorConsumer.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "DisruptorElement.h"
23 #include <functional>
24 
25 namespace catapult { namespace disruptor {
26 
28  template<typename TInput>
29  using DisruptorConsumerT = std::function<ConsumerResult (TInput&)>;
30 
33 
36 
39 
42 
45 
48 
50  std::vector<DisruptorConsumer> DisruptorConsumersFromBlockConsumers(const std::vector<BlockConsumer>& blockConsumers);
51 
53  std::vector<DisruptorConsumer> DisruptorConsumersFromTransactionConsumers(
54  const std::vector<TransactionConsumer>& transactionConsumers);
55 }}
catapult::disruptor::TransactionConsumer
DisruptorConsumerT< TransactionElements > TransactionConsumer
A transaction disruptor consumer function.
Definition: DisruptorConsumer.h:44
catapult::disruptor::ConstBlockConsumer
DisruptorConsumerT< const BlockElements > ConstBlockConsumer
A const block disruptor consumer function.
Definition: DisruptorConsumer.h:41
catapult::disruptor::ConstDisruptorConsumer
DisruptorConsumerT< const ConsumerInput > ConstDisruptorConsumer
A const disruptor consumer function.
Definition: DisruptorConsumer.h:35
catapult::disruptor::ConstTransactionConsumer
DisruptorConsumerT< const TransactionElements > ConstTransactionConsumer
A const transaction disruptor consumer function.
Definition: DisruptorConsumer.h:47
DisruptorConsumer.h
catapult::disruptor::DisruptorConsumerT
std::function< ConsumerResult(TInput &)> DisruptorConsumerT
A typed disruptor consumer function.
Definition: DisruptorConsumer.h:29
catapult::disruptor::DisruptorConsumersFromTransactionConsumers
std::vector< DisruptorConsumer > DisruptorConsumersFromTransactionConsumers(const std::vector< TransactionConsumer > &transactionConsumers)
Maps transactionConsumers to disruptor consumers so that they can be used to create a ConsumerDispatc...
Definition: DisruptorConsumer.cpp:50
catapult::disruptor::BlockConsumer
DisruptorConsumerT< BlockElements > BlockConsumer
A block disruptor consumer function.
Definition: DisruptorConsumer.h:38
CATAPULT_THROW_INVALID_ARGUMENT
#define CATAPULT_THROW_INVALID_ARGUMENT(MESSAGE)
Macro used to throw a catapult invalid argument.
Definition: exceptions.h:179
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::disruptor::DisruptorConsumer
DisruptorConsumerT< ConsumerInput > DisruptorConsumer
A disruptor consumer function.
Definition: DisruptorConsumer.h:32
DisruptorElement.h
catapult::disruptor::ConsumerResult
Result of a consumer operation.
Definition: DisruptorTypes.h:63
catapult::disruptor::DisruptorConsumersFromBlockConsumers
std::vector< DisruptorConsumer > DisruptorConsumersFromBlockConsumers(const std::vector< BlockConsumer > &blockConsumers)
Maps blockConsumers to disruptor consumers so that they can be used to create a ConsumerDispatcher.
Definition: DisruptorConsumer.cpp:44