CatapultServer
v0.5.0.1 (Elephant)
|
const auto & blockRangeConsumerFactory() const
Gets the factory for creating a BlockRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:161
consumers::NewBlockSink NewBlockSink
A new block sink prototype.
Definition: ServerHooks.h:38
std::vector< PacketPayloadSink > m_packetPayloadSinks
Definition: ServerHooks.h:203
const auto & completionAwareBlockRangeConsumerFactory() const
Gets the factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:166
RemoteChainHeightsRetriever m_remoteChainHeightsRetriever
Definition: ServerHooks.h:211
void setCompletionAwareBlockRangeConsumerFactory(const CompletionAwareBlockRangeConsumerFactoryFunc &factory)
Sets the factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:110
std::function< bool(TArgs...)> predicate
A predicate function.
Definition: functions.h:31
std::function< thread::future< std::vector< Height > >(size_t)> RemoteChainHeightsRetriever
A retriever that returns the network chain heights for a number of peers.
Definition: ServerHooks.h:66
InputSource
Possible consumer input sources.
Definition: InputSource.h:42
consumer< const TransactionEventData & > TransactionEventHandler
Handler that is called when a transaction event is raised.
Definition: TransactionEvent.h:54
const TFunc & Require(const TFunc &func)
Returns func if and only if it is set.
Definition: BasicServerHooks.h:38
std::function< TransactionRangeConsumerFunc(disruptor::InputSource)> TransactionRangeConsumerFactoryFunc
Factory for creating a TransactionRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:63
void SetOnce(TFunc &dest, const TFunc &source)
Sets dest to source if and only if dest is unset.
Definition: BasicServerHooks.h:29
predicate< Timestamp, const Hash256 & > KnownHashPredicate
Predicate for determining if a hash is known.
Definition: ChainFunctions.h:36
auto chainSyncedPredicate() const
Gets the chain synced predicate.
Definition: ServerHooks.h:181
CompletionAwareBlockRangeConsumerFactoryFunc m_completionAwareBlockRangeConsumerFactory
Definition: ServerHooks.h:208
std::function< chain::CompletionAwareBlockRangeConsumerFunc(disruptor::InputSource)> CompletionAwareBlockRangeConsumerFactoryFunc
Factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:57
void addTransactionEventHandler(const TransactionEventHandler &handler)
Adds a transaction event handler.
Definition: ServerHooks.h:100
predicate<> ChainSyncedPredicate
Predicate for determining if a chain is synced.
Definition: ServerHooks.h:69
handlers::TransactionRangeHandler TransactionRangeConsumerFunc
Function signature for delivering a transaction range to a consumer.
Definition: ServerHooks.h:60
consumers::BlockChainSyncHandlers::TransactionsChangeFunc TransactionsChangeHandler
Handler that is called when the confirmed state of transactions changes.
Definition: ServerHooks.h:47
std::function< disruptor::DisruptorElementId(model::AnnotatedBlockRange &&, const disruptor::ProcessingCompleteFunc &)> CompletionAwareBlockRangeConsumerFunc
Function signature for delivering a block range to a consumer with an additional completion handler.
Definition: ChainSynchronizer.h:43
auto transactionsChangeHandler() const
Gets the transactions change handler.
Definition: ServerHooks.h:151
chain::KnownHashPredicate KnownHashPredicate
Predicate for determining if a hash is known.
Definition: ServerHooks.h:72
auto newTransactionsSink() const
Gets the new transactions sink.
Definition: ServerHooks.h:141
consumer< const ionet::PacketPayload & > PacketPayloadSink
A packet payload sink.
Definition: ServerHooks.h:44
std::vector< NewBlockSink > m_newBlockSinks
Definition: ServerHooks.h:201
std::function< BlockRangeConsumerFunc(disruptor::InputSource)> BlockRangeConsumerFactoryFunc
Factory for creating a BlockRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:53
KnownHashPredicate knownHashPredicate(const cache::MemoryUtCache &utCache) const
Gets the known hash predicate augmented with a check in utCache.
Definition: ServerHooks.h:186
auto transactionEventHandler() const
Gets the transaction event handler.
Definition: ServerHooks.h:156
std::vector< SharedNewTransactionsSink > m_newTransactionsSinks
Definition: ServerHooks.h:202
bool contains(const Hash256 &hash) const
Returns true if the cache contains an unconfirmed transaction with associated hash,...
Definition: MemoryUtCache.cpp:67
void setTransactionRangeConsumerFactory(const TransactionRangeConsumerFactoryFunc &factory)
Sets the factory for creating a TransactionRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:115
void addNewBlockSink(const NewBlockSink &sink)
Adds a new block sink.
Definition: ServerHooks.h:80
RangeHandler< model::Block > BlockRangeHandler
Prototype for a function that processes a range of blocks.
Definition: HandlerTypes.h:32
std::vector< TransactionsChangeHandler > m_transactionsChangeHandlers
Definition: ServerHooks.h:204
RangeHandler< model::Transaction > TransactionRangeHandler
Prototype for a function that processes a range of transactions.
Definition: HandlerTypes.h:35
void addNewTransactionsSink(const SharedNewTransactionsSink &sink)
Adds a new transactions sink.
Definition: ServerHooks.h:85
std::vector< TransactionEventHandler > m_transactionEventHandlers
Definition: ServerHooks.h:205
void addKnownHashPredicate(const KnownHashPredicate &predicate)
Adds a known hash predicate.
Definition: ServerHooks.h:130
handlers::BlockRangeHandler BlockRangeConsumerFunc
Function signature for delivering a block range to a consumer.
Definition: ServerHooks.h:50
Hooks that can be used to configure server behavior.
Definition: ServerHooks.h:77
Cache for all unconfirmed transactions.
Definition: MemoryUtCache.h:81
TransactionRangeConsumerFactoryFunc m_transactionRangeConsumerFactory
Definition: ServerHooks.h:209
const auto & remoteChainHeightsRetriever() const
Gets the remote chain heights retriever.
Definition: ServerHooks.h:176
const auto & transactionRangeConsumerFactory() const
Gets the factory for creating a TransactionRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:171
Definition: AddressExtractionExtension.cpp:28
std::vector< KnownHashPredicate > m_knownHashPredicates
Definition: ServerHooks.h:213
consumer< const std::shared_ptr< const model::Block > & > NewBlockSink
Prototype for a function that is called with a new block.
Definition: BlockConsumers.h:84
void setRemoteChainHeightsRetriever(const RemoteChainHeightsRetriever &retriever)
Sets the remote heights chain retriever.
Definition: ServerHooks.h:120
BlockRangeConsumerFactoryFunc m_blockRangeConsumerFactory
Definition: ServerHooks.h:207
void setChainSyncedPredicate(const ChainSyncedPredicate &predicate)
Sets the chain synced predicate.
Definition: ServerHooks.h:125
MemoryUtCacheView view() const
Gets a read only view based on this cache.
Definition: MemoryUtCache.cpp:223
consumer< const TransactionsChangeInfo & > TransactionsChangeFunc
Prototype for transaction change notification.
Definition: BlockChainSyncHandlers.h:90
void addPacketPayloadSink(const PacketPayloadSink &sink)
Adds a packet payload sink.
Definition: ServerHooks.h:90
auto newBlockSink() const
Gets the new block sink.
Definition: ServerHooks.h:136
void addTransactionsChangeHandler(const TransactionsChangeHandler &handler)
Adds a transactions change handler.
Definition: ServerHooks.h:95
std::function< void(TArgs...)> consumer
A consumer function.
Definition: functions.h:35
void setBlockRangeConsumerFactory(const BlockRangeConsumerFactoryFunc &factory)
Sets the factory for creating a BlockRangeConsumerFunc bound to an input source.
Definition: ServerHooks.h:105
consumer< const consumers::TransactionInfos & > SharedNewTransactionsSink
A new transactions sink prototype that does not take ownership of new infos.
Definition: ServerHooks.h:41
ChainSyncedPredicate m_chainSyncedPredicate
Definition: ServerHooks.h:212
auto packetPayloadSink() const
Gets the packet payload sink.
Definition: ServerHooks.h:146
TConsumer AggregateConsumers(const std::vector< TConsumer > &consumers)
Aggregates multiple consumers into a single consumer.
Definition: BasicServerHooks.h:47