|
CatapultServer
v0.5.0.1 (Elephant)
|
A read only view on top of partial transactions cache. More...

Public Member Functions | |
| MemoryPtCacheView (uint64_t maxResponseSize, const PtDataContainer &transactionDataContainer, utils::SpinReaderWriterLock::ReaderLockGuard &&readLock) | |
| size_t | size () const |
| Returns the number of partial transactions in the cache. More... | |
| model::WeakCosignedTransactionInfo | find (const Hash256 &hash) const |
Finds a partial transaction in the cache with associated hash or returns nullptr if no such transaction exists. More... | |
| ShortHashPairRange | shortHashPairs () const |
| UnknownTransactionInfos | unknownTransactions (const ShortHashPairMap &knownShortHashPairs) const |
| Gets a vector of all unknown transaction infos in the cache that do not have a short hash pair in knownShortHashPairs. More... | |
Private Types | |
| using | UnknownTransactionInfos = std::vector< model::CosignedTransactionInfo > |
Private Attributes | |
| uint64_t | m_maxResponseSize |
| const PtDataContainer & | m_transactionDataContainer |
| utils::SpinReaderWriterLock::ReaderLockGuard | m_readLock |
A read only view on top of partial transactions cache.
|
private |
|
explicit |
Creates a view around around a maximum response size (maxResponseSize), a partial transaction data container (transactionDataContainer) with lock context readLock.
| model::WeakCosignedTransactionInfo catapult::cache::MemoryPtCacheView::find | ( | const Hash256 & | hash | ) | const |
Finds a partial transaction in the cache with associated hash or returns nullptr if no such transaction exists.
| ShortHashPairRange catapult::cache::MemoryPtCacheView::shortHashPairs | ( | ) | const |
Gets a range of short hash pairs of all transactions in the cache. A short hash pair consists of the first 4 bytes of the transaction hash and the first 4 bytes of the cosignature hash.

| size_t catapult::cache::MemoryPtCacheView::size | ( | ) | const |
Returns the number of partial transactions in the cache.
| MemoryPtCacheView::UnknownTransactionInfos catapult::cache::MemoryPtCacheView::unknownTransactions | ( | const ShortHashPairMap & | knownShortHashPairs | ) | const |
Gets a vector of all unknown transaction infos in the cache that do not have a short hash pair in knownShortHashPairs.

|
private |
|
private |
|
private |