hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
iroha::ordering::OnDemandConnectionManager Class Reference

#include "on_demand_connection_manager.hpp"

Inheritance diagram for iroha::ordering::OnDemandConnectionManager:
Inheritance graph
Collaboration diagram for iroha::ordering::OnDemandConnectionManager:
Collaboration graph

Classes

struct  CurrentPeers
 

Public Types

enum  PeerType { kRejectConsumer = 0, kCommitConsumer, kIssuer, kCount }
 
template<typename T >
using PeerCollectionType = std::array< T, kCount >
 Collection with value types which represent peers. More...
 
- Public Types inherited from iroha::ordering::transport::OdOsNotification
using TransactionBatchType = std::shared_ptr< shared_model::interface::TransactionBatch >
 
using CollectionType = std::vector< TransactionBatchType >
 

Public Member Functions

 OnDemandConnectionManager (std::shared_ptr< transport::OdOsNotificationFactory > factory, logger::LoggerPtr log)
 
 OnDemandConnectionManager (std::shared_ptr< transport::OdOsNotificationFactory > factory, CurrentPeers initial_peers, logger::LoggerPtr log)
 
 ~OnDemandConnectionManager () override
 
void onBatches (CollectionType batches) override
 
void onRequestProposal (consensus::Round round) override
 
void initializeConnections (const CurrentPeers &peers)
 
- Public Member Functions inherited from iroha::ordering::transport::OdOsNotification
virtual ~OdOsNotification ()=default
 

Detailed Description

Proxy class which redirects requests to appropriate peers

Member Typedef Documentation

◆ PeerCollectionType

template<typename T >
using iroha::ordering::OnDemandConnectionManager::PeerCollectionType = std::array<T, kCount>

Collection with value types which represent peers.

Member Enumeration Documentation

◆ PeerType

Responsibilities of individual peers from the peers array Transactions are sent to three ordering services: current round (issuer), reject round, and commit round Proposal is requested from the current ordering service: issuer

Enumerator
kRejectConsumer 
kCommitConsumer 
kIssuer 
kCount 

Constructor & Destructor Documentation

◆ OnDemandConnectionManager() [1/2]

OnDemandConnectionManager::OnDemandConnectionManager ( std::shared_ptr< transport::OdOsNotificationFactory factory,
logger::LoggerPtr  log 
)

◆ OnDemandConnectionManager() [2/2]

OnDemandConnectionManager::OnDemandConnectionManager ( std::shared_ptr< transport::OdOsNotificationFactory factory,
CurrentPeers  initial_peers,
logger::LoggerPtr  log 
)
Here is the call graph for this function:

◆ ~OnDemandConnectionManager()

OnDemandConnectionManager::~OnDemandConnectionManager ( )
override

Member Function Documentation

◆ initializeConnections()

void OnDemandConnectionManager::initializeConnections ( const CurrentPeers peers)

Initialize corresponding peers in connections_ using factory_

Parameters
peersto initialize connections with
Here is the caller graph for this function:

◆ onBatches()

void OnDemandConnectionManager::onBatches ( CollectionType  batches)
overridevirtual

Callback on receiving transactions

Parameters
batches- vector of passed transaction batches

Implements iroha::ordering::transport::OdOsNotification.

◆ onRequestProposal()

void OnDemandConnectionManager::onRequestProposal ( consensus::Round  round)
overridevirtual

Callback on request about proposal

Parameters
round- number of collaboration round. Calculated as block_height + 1

Implements iroha::ordering::transport::OdOsNotification.


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