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

#include "command_service_impl.hpp"

Inheritance diagram for iroha::torii::CommandServiceImpl:
Inheritance graph
Collaboration diagram for iroha::torii::CommandServiceImpl:
Collaboration graph

Public Member Functions

 CommandServiceImpl (std::shared_ptr< iroha::torii::TransactionProcessor > tx_processor, std::shared_ptr< iroha::ametsuchi::Storage > storage, std::shared_ptr< iroha::torii::StatusBus > status_bus, std::shared_ptr< shared_model::interface::TxStatusFactory > status_factory, logger::Logger log=logger::log("CommandServiceImpl"))
 
 CommandServiceImpl (const CommandServiceImpl &)=delete
 
CommandServiceImploperator= (const CommandServiceImpl &)=delete
 
void handleTransactionBatch (std::shared_ptr< shared_model::interface::TransactionBatch > batch) override
 
std::shared_ptr< shared_model::interface::TransactionResponsegetStatus (const shared_model::crypto::Hash &request) override
 
rxcpp::observable< std::shared_ptr< shared_model::interface::TransactionResponse > > getStatusStream (const shared_model::crypto::Hash &hash) override
 
- Public Member Functions inherited from iroha::torii::CommandService
virtual ~CommandService ()=default
 

Detailed Description

Actual implementation of sync CommandServiceImpl.

Constructor & Destructor Documentation

iroha::torii::CommandServiceImpl::CommandServiceImpl ( std::shared_ptr< iroha::torii::TransactionProcessor tx_processor,
std::shared_ptr< iroha::ametsuchi::Storage storage,
std::shared_ptr< iroha::torii::StatusBus status_bus,
std::shared_ptr< shared_model::interface::TxStatusFactory status_factory,
logger::Logger  log = logger::log("CommandServiceImpl") 
)

Creates a new instance of CommandService

Parameters
tx_processor- processor of received transactions
storage- to query transactions outside the cache
status_busis a common notifier for tx statuses
logto print progress
iroha::torii::CommandServiceImpl::CommandServiceImpl ( const CommandServiceImpl )
delete

Disable copying in any way to prevent potential issues with common storage/tx_processor

Member Function Documentation

std::shared_ptr< shared_model::interface::TransactionResponse > iroha::torii::CommandServiceImpl::getStatus ( const shared_model::crypto::Hash request)
overridevirtual

Request to retrieve a status of any particular transaction

Parameters
request- TxStatusRequest object which identifies transaction uniquely
Returns
response which contains a current state of requested transaction

Implements iroha::torii::CommandService.

Here is the call graph for this function:

rxcpp::observable< std::shared_ptr< shared_model::interface::TransactionResponse > > iroha::torii::CommandServiceImpl::getStatusStream ( const shared_model::crypto::Hash hash)
overridevirtual

Streaming call which will repeatedly send all statuses of requested transaction from its status at the moment of receiving this request to the some final transaction status (which cannot change anymore)

Parameters
request-TxStatusRequest object which identifies transaction uniquely
Returns
observable with transaction statuses

Implements iroha::torii::CommandService.

Here is the call graph for this function:

void iroha::torii::CommandServiceImpl::handleTransactionBatch ( std::shared_ptr< shared_model::interface::TransactionBatch batch)
overridevirtual

Actual implementation of sync Torii in CommandService

Parameters
batch- transactions we've received

Implements iroha::torii::CommandService.

CommandServiceImpl& iroha::torii::CommandServiceImpl::operator= ( const CommandServiceImpl )
delete

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