CatapultServer
v0.5.0.1 (Elephant)
|
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< TransactionUpdateResult > | update (const model::TransactionInfo &transactionInfo) |
Updates this cache by adding a new transaction info (transactionInfo). More... | |
thread::future< CosignatureUpdateResult > | update (const model::DetachedCosignature &cosignature) |
Updates this cache by adding a new cosignature. More... | |
Private Attributes | |
std::shared_ptr< Impl > | m_pImpl |
Provides updating of a partial transactions cache.
using catapult::chain::PtUpdater::CompletedTransactionSink = consumer<std::unique_ptr<model::Transaction>&&> |
Sink that is passed completed transactions.
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.
|
default |
Destroys the updater.
thread::future< CosignatureUpdateResult > catapult::chain::PtUpdater::update | ( | const model::DetachedCosignature & | cosignature | ) |
Updates this cache by adding a new cosignature.
thread::future< TransactionUpdateResult > catapult::chain::PtUpdater::update | ( | const model::TransactionInfo & | transactionInfo | ) |
Updates this cache by adding a new transaction info (transactionInfo).
|
private |