CatapultServer  v0.5.0.1 (Elephant)
catapult::nodediscovery::PeersProcessor Class Reference

Processes peers received from a partner node. More...

Collaboration diagram for catapult::nodediscovery::PeersProcessor:

Public Member Functions

 PeersProcessor (const ionet::NodeContainer &nodeContainer, const NodePingRequestInitiator &pingRequestInitiator, model::NetworkIdentifier networkIdentifier, const NodeConsumer &newPartnerNodeConsumer)
 
void process (const ionet::NodeSet &candidateNodes) const
 Processes all candidate nodes (candidateNodes) and forwards newly discovered partner nodes. More...
 

Private Types

using NodeConsumer = consumer< const ionet::Node & >
 
using NodePingRequestInitiator = consumer< const ionet::Node &, const consumer< net::NodeRequestResult, const ionet::Node & > & >
 

Private Member Functions

void process (const ionet::Node &candidateNode) const
 

Private Attributes

const ionet::NodeContainerm_nodeContainer
 
NodePingRequestInitiator m_pingRequestInitiator
 
model::NetworkIdentifier m_networkIdentifier
 
NodeConsumer m_newPartnerNodeConsumer
 

Detailed Description

Processes peers received from a partner node.

Member Typedef Documentation

◆ NodeConsumer

◆ NodePingRequestInitiator

Constructor & Destructor Documentation

◆ PeersProcessor()

catapult::nodediscovery::PeersProcessor::PeersProcessor ( const ionet::NodeContainer nodeContainer,
const NodePingRequestInitiator pingRequestInitiator,
model::NetworkIdentifier  networkIdentifier,
const NodeConsumer newPartnerNodeConsumer 
)

Creates a processor around the set of known nodes (nodeContainer), a service for pinging other nodes (pingRequesInitiator), the current network identifier (networkIdentifier) and a consumer that should be called when new partner nodes are discovered (newPartnerNodeConsumer).

Member Function Documentation

◆ process() [1/2]

void catapult::nodediscovery::PeersProcessor::process ( const ionet::Node candidateNode) const
private
Here is the call graph for this function:

◆ process() [2/2]

void catapult::nodediscovery::PeersProcessor::process ( const ionet::NodeSet candidateNodes) const

Processes all candidate nodes (candidateNodes) and forwards newly discovered partner nodes.

Here is the call graph for this function:

Member Data Documentation

◆ m_networkIdentifier

model::NetworkIdentifier catapult::nodediscovery::PeersProcessor::m_networkIdentifier
private

◆ m_newPartnerNodeConsumer

NodeConsumer catapult::nodediscovery::PeersProcessor::m_newPartnerNodeConsumer
private

◆ m_nodeContainer

const ionet::NodeContainer& catapult::nodediscovery::PeersProcessor::m_nodeContainer
private

◆ m_pingRequestInitiator

NodePingRequestInitiator catapult::nodediscovery::PeersProcessor::m_pingRequestInitiator
private

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