CatapultServer  v0.5.0.1 (Elephant)
catapult::extensions::ServerHooks Class Reference

Hooks that can be used to configure server behavior. More...

Public Member Functions

void addNewBlockSink (const NewBlockSink &sink)
 Adds a new block sink. More...
 
void addNewTransactionsSink (const SharedNewTransactionsSink &sink)
 Adds a new transactions sink. More...
 
void addPacketPayloadSink (const PacketPayloadSink &sink)
 Adds a packet payload sink. More...
 
void addTransactionsChangeHandler (const TransactionsChangeHandler &handler)
 Adds a transactions change handler. More...
 
void addTransactionEventHandler (const TransactionEventHandler &handler)
 Adds a transaction event handler. More...
 
void setBlockRangeConsumerFactory (const BlockRangeConsumerFactoryFunc &factory)
 Sets the factory for creating a BlockRangeConsumerFunc bound to an input source. More...
 
void setCompletionAwareBlockRangeConsumerFactory (const CompletionAwareBlockRangeConsumerFactoryFunc &factory)
 Sets the factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source. More...
 
void setTransactionRangeConsumerFactory (const TransactionRangeConsumerFactoryFunc &factory)
 Sets the factory for creating a TransactionRangeConsumerFunc bound to an input source. More...
 
void setRemoteChainHeightsRetriever (const RemoteChainHeightsRetriever &retriever)
 Sets the remote heights chain retriever. More...
 
void setChainSyncedPredicate (const ChainSyncedPredicate &predicate)
 Sets the chain synced predicate. More...
 
void addKnownHashPredicate (const KnownHashPredicate &predicate)
 Adds a known hash predicate. More...
 
auto newBlockSink () const
 Gets the new block sink. More...
 
auto newTransactionsSink () const
 Gets the new transactions sink. More...
 
auto packetPayloadSink () const
 Gets the packet payload sink. More...
 
auto transactionsChangeHandler () const
 Gets the transactions change handler. More...
 
auto transactionEventHandler () const
 Gets the transaction event handler. More...
 
const auto & blockRangeConsumerFactory () const
 Gets the factory for creating a BlockRangeConsumerFunc bound to an input source. More...
 
const auto & completionAwareBlockRangeConsumerFactory () const
 Gets the factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source. More...
 
const auto & transactionRangeConsumerFactory () const
 Gets the factory for creating a TransactionRangeConsumerFunc bound to an input source. More...
 
const auto & remoteChainHeightsRetriever () const
 Gets the remote chain heights retriever. More...
 
auto chainSyncedPredicate () const
 Gets the chain synced predicate. More...
 
KnownHashPredicate knownHashPredicate (const cache::MemoryUtCache &utCache) const
 Gets the known hash predicate augmented with a check in utCache. More...
 

Private Attributes

std::vector< NewBlockSinkm_newBlockSinks
 
std::vector< SharedNewTransactionsSinkm_newTransactionsSinks
 
std::vector< PacketPayloadSinkm_packetPayloadSinks
 
std::vector< TransactionsChangeHandlerm_transactionsChangeHandlers
 
std::vector< TransactionEventHandlerm_transactionEventHandlers
 
BlockRangeConsumerFactoryFunc m_blockRangeConsumerFactory
 
CompletionAwareBlockRangeConsumerFactoryFunc m_completionAwareBlockRangeConsumerFactory
 
TransactionRangeConsumerFactoryFunc m_transactionRangeConsumerFactory
 
RemoteChainHeightsRetriever m_remoteChainHeightsRetriever
 
ChainSyncedPredicate m_chainSyncedPredicate
 
std::vector< KnownHashPredicatem_knownHashPredicates
 

Detailed Description

Hooks that can be used to configure server behavior.

Member Function Documentation

◆ addKnownHashPredicate()

void catapult::extensions::ServerHooks::addKnownHashPredicate ( const KnownHashPredicate predicate)
inline

Adds a known hash predicate.

◆ addNewBlockSink()

void catapult::extensions::ServerHooks::addNewBlockSink ( const NewBlockSink sink)
inline

Adds a new block sink.

◆ addNewTransactionsSink()

void catapult::extensions::ServerHooks::addNewTransactionsSink ( const SharedNewTransactionsSink sink)
inline

Adds a new transactions sink.

◆ addPacketPayloadSink()

void catapult::extensions::ServerHooks::addPacketPayloadSink ( const PacketPayloadSink sink)
inline

Adds a packet payload sink.

◆ addTransactionEventHandler()

void catapult::extensions::ServerHooks::addTransactionEventHandler ( const TransactionEventHandler handler)
inline

Adds a transaction event handler.

◆ addTransactionsChangeHandler()

void catapult::extensions::ServerHooks::addTransactionsChangeHandler ( const TransactionsChangeHandler handler)
inline

Adds a transactions change handler.

◆ blockRangeConsumerFactory()

const auto& catapult::extensions::ServerHooks::blockRangeConsumerFactory ( ) const
inline

Gets the factory for creating a BlockRangeConsumerFunc bound to an input source.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ chainSyncedPredicate()

auto catapult::extensions::ServerHooks::chainSyncedPredicate ( ) const
inline

Gets the chain synced predicate.

Here is the caller graph for this function:

◆ completionAwareBlockRangeConsumerFactory()

const auto& catapult::extensions::ServerHooks::completionAwareBlockRangeConsumerFactory ( ) const
inline

Gets the factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source.

Here is the call graph for this function:

◆ knownHashPredicate()

KnownHashPredicate catapult::extensions::ServerHooks::knownHashPredicate ( const cache::MemoryUtCache utCache) const
inline

Gets the known hash predicate augmented with a check in utCache.

Here is the call graph for this function:

◆ newBlockSink()

auto catapult::extensions::ServerHooks::newBlockSink ( ) const
inline

Gets the new block sink.

Here is the call graph for this function:

◆ newTransactionsSink()

auto catapult::extensions::ServerHooks::newTransactionsSink ( ) const
inline

Gets the new transactions sink.

Here is the call graph for this function:

◆ packetPayloadSink()

auto catapult::extensions::ServerHooks::packetPayloadSink ( ) const
inline

Gets the packet payload sink.

Here is the call graph for this function:

◆ remoteChainHeightsRetriever()

const auto& catapult::extensions::ServerHooks::remoteChainHeightsRetriever ( ) const
inline

Gets the remote chain heights retriever.

Here is the call graph for this function:

◆ setBlockRangeConsumerFactory()

void catapult::extensions::ServerHooks::setBlockRangeConsumerFactory ( const BlockRangeConsumerFactoryFunc factory)
inline

Sets the factory for creating a BlockRangeConsumerFunc bound to an input source.

Here is the call graph for this function:

◆ setChainSyncedPredicate()

void catapult::extensions::ServerHooks::setChainSyncedPredicate ( const ChainSyncedPredicate predicate)
inline

Sets the chain synced predicate.

Here is the call graph for this function:

◆ setCompletionAwareBlockRangeConsumerFactory()

void catapult::extensions::ServerHooks::setCompletionAwareBlockRangeConsumerFactory ( const CompletionAwareBlockRangeConsumerFactoryFunc factory)
inline

Sets the factory for creating a CompletionAwareBlockRangeConsumerFunc bound to an input source.

Here is the call graph for this function:

◆ setRemoteChainHeightsRetriever()

void catapult::extensions::ServerHooks::setRemoteChainHeightsRetriever ( const RemoteChainHeightsRetriever retriever)
inline

Sets the remote heights chain retriever.

Here is the call graph for this function:

◆ setTransactionRangeConsumerFactory()

void catapult::extensions::ServerHooks::setTransactionRangeConsumerFactory ( const TransactionRangeConsumerFactoryFunc factory)
inline

Sets the factory for creating a TransactionRangeConsumerFunc bound to an input source.

Here is the call graph for this function:

◆ transactionEventHandler()

auto catapult::extensions::ServerHooks::transactionEventHandler ( ) const
inline

Gets the transaction event handler.

Here is the call graph for this function:

◆ transactionRangeConsumerFactory()

const auto& catapult::extensions::ServerHooks::transactionRangeConsumerFactory ( ) const
inline

Gets the factory for creating a TransactionRangeConsumerFunc bound to an input source.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ transactionsChangeHandler()

auto catapult::extensions::ServerHooks::transactionsChangeHandler ( ) const
inline

Gets the transactions change handler.

Here is the call graph for this function:

Member Data Documentation

◆ m_blockRangeConsumerFactory

BlockRangeConsumerFactoryFunc catapult::extensions::ServerHooks::m_blockRangeConsumerFactory
private

◆ m_chainSyncedPredicate

ChainSyncedPredicate catapult::extensions::ServerHooks::m_chainSyncedPredicate
private

◆ m_completionAwareBlockRangeConsumerFactory

CompletionAwareBlockRangeConsumerFactoryFunc catapult::extensions::ServerHooks::m_completionAwareBlockRangeConsumerFactory
private

◆ m_knownHashPredicates

std::vector<KnownHashPredicate> catapult::extensions::ServerHooks::m_knownHashPredicates
private

◆ m_newBlockSinks

std::vector<NewBlockSink> catapult::extensions::ServerHooks::m_newBlockSinks
private

◆ m_newTransactionsSinks

std::vector<SharedNewTransactionsSink> catapult::extensions::ServerHooks::m_newTransactionsSinks
private

◆ m_packetPayloadSinks

std::vector<PacketPayloadSink> catapult::extensions::ServerHooks::m_packetPayloadSinks
private

◆ m_remoteChainHeightsRetriever

RemoteChainHeightsRetriever catapult::extensions::ServerHooks::m_remoteChainHeightsRetriever
private

◆ m_transactionEventHandlers

std::vector<TransactionEventHandler> catapult::extensions::ServerHooks::m_transactionEventHandlers
private

◆ m_transactionRangeConsumerFactory

TransactionRangeConsumerFactoryFunc catapult::extensions::ServerHooks::m_transactionRangeConsumerFactory
private

◆ m_transactionsChangeHandlers

std::vector<TransactionsChangeHandler> catapult::extensions::ServerHooks::m_transactionsChangeHandlers
private

The documentation for this class was generated from the following file: