CCF
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ccf::indexing::strategies::VisitEachEntryInMap Class Referenceabstract

#include <visit_each_entry_in_map.h>

Inherits ccf::indexing::Strategy.

Inherited by ccf::indexing::strategies::SeqnosByKey_Bucketed_Untyped, and ccf::indexing::strategies::SeqnosByKey_InMemory_Untyped.

Public Member Functions

 VisitEachEntryInMap (const std::string &map_name_, const std::string &strategy_prefix="VisitEachEntryIn")
 
virtual ~VisitEachEntryInMap ()=default
 
void handle_committed_transaction (const ccf::TxID &tx_id, const ccf::kv::ReadOnlyStorePtr &store) override
 
std::optional< ccf::SeqNonext_requested () override
 
nlohmann::json describe () override
 
ccf::TxID get_indexed_watermark ()
 
- Public Member Functions inherited from ccf::indexing::Strategy
 Strategy (const std::string &name)
 
virtual ~Strategy ()=default
 
std::string get_name () const
 
virtual void tick ()
 

Protected Member Functions

virtual void visit_entry (const ccf::TxID &tx_id, const ccf::ByteVector &k, const ccf::ByteVector &v)=0
 

Protected Attributes

std::string map_name
 
ccf::pal::Mutex current_txid_lock
 
ccf::TxID current_txid = {}
 

Constructor & Destructor Documentation

◆ VisitEachEntryInMap()

ccf::indexing::strategies::VisitEachEntryInMap::VisitEachEntryInMap ( const std::string &  map_name_,
const std::string &  strategy_prefix = "VisitEachEntryIn" 
)

◆ ~VisitEachEntryInMap()

virtual ccf::indexing::strategies::VisitEachEntryInMap::~VisitEachEntryInMap ( )
virtualdefault

Member Function Documentation

◆ describe()

nlohmann::json ccf::indexing::strategies::VisitEachEntryInMap::describe ( )
overridevirtual

Reimplemented from ccf::indexing::Strategy.

◆ get_indexed_watermark()

ccf::TxID ccf::indexing::strategies::VisitEachEntryInMap::get_indexed_watermark ( )

◆ handle_committed_transaction()

void ccf::indexing::strategies::VisitEachEntryInMap::handle_committed_transaction ( const ccf::TxID tx_id,
const ccf::kv::ReadOnlyStorePtr store 
)
overridevirtual

Receives every committed transaction, in-order, shortly after commit.

The given store contains only the changes that occured in the current transaction.

Implements ccf::indexing::Strategy.

◆ next_requested()

std::optional< ccf::SeqNo > ccf::indexing::strategies::VisitEachEntryInMap::next_requested ( )
overridevirtual

Returns next tx for which this index should be populated, or nullopt if it wants none. Allows indexes to be populated lazily on-demand, or out-of-order, or reset

Implements ccf::indexing::Strategy.

◆ visit_entry()

virtual void ccf::indexing::strategies::VisitEachEntryInMap::visit_entry ( const ccf::TxID tx_id,
const ccf::ByteVector k,
const ccf::ByteVector v 
)
protectedpure virtual

Member Data Documentation

◆ current_txid

ccf::TxID ccf::indexing::strategies::VisitEachEntryInMap::current_txid = {}
protected

◆ current_txid_lock

ccf::pal::Mutex ccf::indexing::strategies::VisitEachEntryInMap::current_txid_lock
protected

◆ map_name

std::string ccf::indexing::strategies::VisitEachEntryInMap::map_name
protected

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