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 Types

using CacheType = iroha::cache::Cache< shared_model::crypto::Hash, std::shared_ptr< shared_model::interface::TransactionResponse >, shared_model::crypto::Hash::Hasher >
 

Public Member Functions

 CommandServiceImpl (std::shared_ptr< iroha::torii::TransactionProcessor > tx_processor, std::shared_ptr< iroha::torii::StatusBus > status_bus, std::shared_ptr< shared_model::interface::TxStatusFactory > status_factory, std::shared_ptr< iroha::torii::CommandServiceImpl::CacheType > cache, std::shared_ptr< iroha::ametsuchi::TxPresenceCache > tx_presence_cache, logger::LoggerPtr log)
 
 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
 
void processTransactionResponse (std::shared_ptr< shared_model::interface::TransactionResponse > response) override
 
- Public Member Functions inherited from iroha::torii::CommandService
virtual ~CommandService ()=default
 

Detailed Description

Actual implementation of sync CommandServiceImpl.

Member Typedef Documentation

◆ CacheType

Constructor & Destructor Documentation

◆ CommandServiceImpl() [1/2]

CommandServiceImpl::CommandServiceImpl ( std::shared_ptr< iroha::torii::TransactionProcessor tx_processor,
std::shared_ptr< iroha::torii::StatusBus status_bus,
std::shared_ptr< shared_model::interface::TxStatusFactory status_factory,
std::shared_ptr< iroha::torii::CommandServiceImpl::CacheType cache,
std::shared_ptr< iroha::ametsuchi::TxPresenceCache tx_presence_cache,
logger::LoggerPtr  log 
)

Creates a new instance of CommandService

Parameters
tx_processor- processor of received transactions
status_busis a common notifier for tx statuses
cache- non-persistent cache, an instance of type CommandServiceImpl::CacheType
tx_presence_cachea cache over persistent storage
logto print progress

◆ CommandServiceImpl() [2/2]

iroha::torii::CommandServiceImpl::CommandServiceImpl ( const CommandServiceImpl )
delete

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

Member Function Documentation

◆ getStatus()

std::shared_ptr< shared_model::interface::TransactionResponse > 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.

◆ handleTransactionBatch()

void 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.

◆ operator=()

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

◆ processTransactionResponse()

void CommandServiceImpl::processTransactionResponse ( std::shared_ptr< shared_model::interface::TransactionResponse response)
overridevirtual

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