CCF
Loading...
Searching...
No Matches
Public Member Functions | List of all members
loggingapp::CommittedRecords Class Reference

Inherits ccf::indexing::Strategy.

Public Member Functions

 CommittedRecords (const std::string &map_name_, const ccf::TxID &initial_txid={})
 
void handle_committed_transaction (const ccf::TxID &tx_id, const ccf::kv::ReadOnlyStorePtr &store) override
 
std::optional< ccf::SeqNonext_requested () override
 
std::optional< std::string > get (size_t id)
 
ccf::TxID get_current_txid ()
 
- Public Member Functions inherited from ccf::indexing::Strategy
 Strategy (const std::string &name)
 
virtual ~Strategy ()=default
 
std::string get_name () const
 
virtual void tick ()
 
virtual nlohmann::json describe ()
 

Constructor & Destructor Documentation

◆ CommittedRecords()

loggingapp::CommittedRecords::CommittedRecords ( const std::string &  map_name_,
const ccf::TxID initial_txid = {} 
)
inline

Member Function Documentation

◆ get()

std::optional< std::string > loggingapp::CommittedRecords::get ( size_t  id)
inline

◆ get_current_txid()

ccf::TxID loggingapp::CommittedRecords::get_current_txid ( )
inline

◆ handle_committed_transaction()

void loggingapp::CommittedRecords::handle_committed_transaction ( const ccf::TxID tx_id,
const ccf::kv::ReadOnlyStorePtr store 
)
inlineoverridevirtual

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 > loggingapp::CommittedRecords::next_requested ( )
inlineoverridevirtual

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.


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