CatapultServer  v0.5.0.1 (Elephant)
BatchPeersRequestor.h
Go to the documentation of this file.
1 
21 #pragma once
22 #include "catapult/ionet/Node.h"
25 #include "catapult/thread/Future.h"
26 
27 namespace catapult { namespace nodediscovery {
28 
31  private:
33  using RemoteApiResults = std::vector<ionet::NodeInteractionResult>;
34 
35  public:
37  explicit BatchPeersRequestor(const net::PacketIoPickerContainer& packetIoPickers, const NodesConsumer& nodesConsumer);
38 
39  public:
42 
43  private:
44  net::PacketIoPickerContainer m_packetIoPickers; // held by value because packet io pickers is tied to ServiceState
46  };
47 }}
FutureUtils.h
PacketIoPickerContainer.h
NodeInteractionResult.h
catapult::nodediscovery::BatchPeersRequestor::BatchPeersRequestor
BatchPeersRequestor(const net::PacketIoPickerContainer &packetIoPickers, const NodesConsumer &nodesConsumer)
Creates a requestor around packetIoPickers, which is used to find partners. Forwards found nodes to n...
Definition: BatchPeersRequestor.cpp:28
colorPrint.warning
def warning(*args)
Definition: colorPrint.py:10
catapult::utils::TimeSpan
Represents a time duration.
Definition: TimeSpan.h:30
catapult::nodediscovery::BatchPeersRequestor::RemoteApiResults
std::vector< ionet::NodeInteractionResult > RemoteApiResults
Definition: BatchPeersRequestor.h:33
RemoteNodeApi.h
catapult::ionet::NodeRoles::None
No roles.
catapult::thread::future
Provides a way to access the result of an asynchronous operation.
Definition: Future.h:29
Node.h
catapult::nodediscovery::BatchPeersRequestor::m_packetIoPickers
net::PacketIoPickerContainer m_packetIoPickers
Definition: BatchPeersRequestor.h:44
catapult::nodediscovery::BatchPeersRequestor
Creates a batch peers requestor.
Definition: BatchPeersRequestor.h:30
ThrottleLogger.h
catapult::nodediscovery::BatchPeersRequestor::m_nodesConsumer
NodesConsumer m_nodesConsumer
Definition: BatchPeersRequestor.h:45
CATAPULT_LOG_THROTTLE
#define CATAPULT_LOG_THROTTLE(LEVEL, THROTTLE_MILLIS)
Definition: ThrottleLogger.h:76
catapult::nodediscovery::BatchPeersRequestor::NodesConsumer
consumer< const ionet::NodeSet & > NodesConsumer
Definition: BatchPeersRequestor.h:32
catapult::net::PacketIoPickerContainer
A collection of packet io pickers.
Definition: PacketIoPickerContainer.h:28
catapult
Definition: AddressExtractionExtension.cpp:28
catapult::nodediscovery::BatchPeersRequestor::findPeersOfPeers
thread::future< RemoteApiResults > findPeersOfPeers(const utils::TimeSpan &timeout) const
Finds and forwards peers of peers within the specified timeout.
Definition: BatchPeersRequestor.cpp:33
Future.h
catapult::net::PacketIoPickerContainer::pickMatching
std::vector< ionet::NodePacketIoPair > pickMatching(const utils::TimeSpan &ioDuration, ionet::NodeRoles roles) const
Definition: PacketIoPickerContainer.cpp:30
catapult::consumer
std::function< void(TArgs...)> consumer
A consumer function.
Definition: functions.h:35
BatchPeersRequestor.h