CatapultServer  v0.5.0.1 (Elephant)
catapult::chain::PtUpdater Class Reference

Provides updating of a partial transactions cache. More...

Classes

class  Impl
 

Public Types

using CompletedTransactionSink = consumer< std::unique_ptr< model::Transaction > && >
 Sink that is passed completed transactions. More...
 

Public Member Functions

 PtUpdater (cache::MemoryPtCacheProxy &transactionsCache, std::unique_ptr< const PtValidator > &&pValidator, const CompletedTransactionSink &completedTransactionSink, const FailedTransactionSink &failedTransactionSink, const std::shared_ptr< thread::IoThreadPool > &pPool)
 
 ~PtUpdater ()
 Destroys the updater. More...
 
thread::future< TransactionUpdateResultupdate (const model::TransactionInfo &transactionInfo)
 Updates this cache by adding a new transaction info (transactionInfo). More...
 
thread::future< CosignatureUpdateResultupdate (const model::DetachedCosignature &cosignature)
 Updates this cache by adding a new cosignature. More...
 

Private Attributes

std::shared_ptr< Implm_pImpl
 

Detailed Description

Provides updating of a partial transactions cache.

Member Typedef Documentation

◆ CompletedTransactionSink

Sink that is passed completed transactions.

Constructor & Destructor Documentation

◆ PtUpdater()

catapult::chain::PtUpdater::PtUpdater ( cache::MemoryPtCacheProxy transactionsCache,
std::unique_ptr< const PtValidator > &&  pValidator,
const CompletedTransactionSink completedTransactionSink,
const FailedTransactionSink failedTransactionSink,
const std::shared_ptr< thread::IoThreadPool > &  pPool 
)

Creates an updater around transactionsCache, pValidator, completedTransactionSink and failedTransactionSink using pPool for parallelization.

◆ ~PtUpdater()

catapult::chain::PtUpdater::~PtUpdater ( )
default

Destroys the updater.

Member Function Documentation

◆ update() [1/2]

thread::future< CosignatureUpdateResult > catapult::chain::PtUpdater::update ( const model::DetachedCosignature cosignature)

Updates this cache by adding a new cosignature.

◆ update() [2/2]

thread::future< TransactionUpdateResult > catapult::chain::PtUpdater::update ( const model::TransactionInfo transactionInfo)

Updates this cache by adding a new transaction info (transactionInfo).

Member Data Documentation

◆ m_pImpl

std::shared_ptr<Impl> catapult::chain::PtUpdater::m_pImpl
private

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