#include "ordering_gate_cache.hpp"


Public Types | |
| using | BatchesSetType = std::unordered_set< std::shared_ptr< shared_model::interface::TransactionBatch >, BatchPointerHasher > |
| using | HashesSetType = std::unordered_set< shared_model::crypto::Hash, shared_model::crypto::Hash::Hasher > |
Public Member Functions | |
| virtual void | addToBack (const BatchesSetType &batches)=0 |
| virtual BatchesSetType | pop ()=0 |
| virtual void | remove (const HashesSetType &hashes)=0 |
| virtual const BatchesSetType & | head () const =0 |
| virtual const BatchesSetType & | tail () const =0 |
| virtual | ~OrderingGateCache ()=default |
Cache for transactions sent to ordering gate
| using iroha::ordering::cache::OrderingGateCache::BatchesSetType = std::unordered_set< std::shared_ptr<shared_model::interface::TransactionBatch>, BatchPointerHasher> |
type of the element in cache container. Set is used as it allows to remove batch from BatchSet with O(1) complexity, which is the case in remove method
| using iroha::ordering::cache::OrderingGateCache::HashesSetType = std::unordered_set<shared_model::crypto::Hash, shared_model::crypto::Hash::Hasher> |
|
virtualdefault |
|
pure virtual |
Concatenates batches from the tail of the queue with provided batches
Implemented in iroha::ordering::cache::OnDemandCache.
|
pure virtual |
Return the head batches
Implemented in iroha::ordering::cache::OnDemandCache.
|
pure virtual |
Pops the head batches and returns them
Implemented in iroha::ordering::cache::OnDemandCache.
|
pure virtual |
Removes batches by provided hashes from the head of the queue
Implemented in iroha::ordering::cache::OnDemandCache.
|
pure virtual |
Return the tail batches
Implemented in iroha::ordering::cache::OnDemandCache.