CCF
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules
Public Member Functions | Static Public Attributes | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
ccf::indexing::Indexer Class Reference

#include <indexer.h>

Inherits ccf::indexing::IndexingStrategies.

Public Member Functions

 Indexer (const std::shared_ptr< TransactionFetcher > &tf)
 
bool update_strategies (std::chrono::milliseconds elapsed, const ccf::TxID &newly_committed)
 
- Public Member Functions inherited from ccf::indexing::IndexingStrategies
virtual ~IndexingStrategies ()=default
 
bool install_strategy (const StrategyPtr &strategy)
 
void uninstall_strategy (const StrategyPtr &strategy)
 
nlohmann::json describe ()
 
- Public Member Functions inherited from ccf::AbstractNodeSubSystem
virtual ~AbstractNodeSubSystem ()=default
 

Static Public Attributes

static constexpr size_t MAX_REQUESTABLE = 500
 

Protected Types

using PendingTx = std::pair< ccf::TxID, std::vector< uint8_t > >
 

Protected Member Functions

void update_commit (const ccf::TxID &tx_id)
 

Static Protected Member Functions

static bool tx_id_less (const ccf::TxID &a, const ccf::TxID &b)
 
static bool uncommitted_entries_cmp (const ccf::TxID &a, const PendingTx &b)
 

Protected Attributes

std::shared_ptr< TransactionFetchertransaction_fetcher
 
std::vector< PendingTxuncommitted_entries
 
ccf::TxID committed = {}
 
- Protected Attributes inherited from ccf::indexing::IndexingStrategies
ccf::pal::Mutex lock
 
std::set< StrategyPtrstrategies
 

Additional Inherited Members

- Static Public Member Functions inherited from ccf::indexing::IndexingStrategies
static char const * get_subsystem_name ()
 

Member Typedef Documentation

◆ PendingTx

using ccf::indexing::Indexer::PendingTx = std::pair<ccf::TxID, std::vector<uint8_t> >
protected

Constructor & Destructor Documentation

◆ Indexer()

ccf::indexing::Indexer::Indexer ( const std::shared_ptr< TransactionFetcher > &  tf)
inline

Member Function Documentation

◆ tx_id_less()

static bool ccf::indexing::Indexer::tx_id_less ( const ccf::TxID a,
const ccf::TxID b 
)
inlinestaticprotected

◆ uncommitted_entries_cmp()

static bool ccf::indexing::Indexer::uncommitted_entries_cmp ( const ccf::TxID a,
const PendingTx b 
)
inlinestaticprotected

◆ update_commit()

void ccf::indexing::Indexer::update_commit ( const ccf::TxID tx_id)
inlineprotected

◆ update_strategies()

bool ccf::indexing::Indexer::update_strategies ( std::chrono::milliseconds  elapsed,
const ccf::TxID newly_committed 
)
inline

Member Data Documentation

◆ committed

ccf::TxID ccf::indexing::Indexer::committed = {}
protected

◆ MAX_REQUESTABLE

constexpr size_t ccf::indexing::Indexer::MAX_REQUESTABLE = 500
staticconstexpr

◆ transaction_fetcher

std::shared_ptr<TransactionFetcher> ccf::indexing::Indexer::transaction_fetcher
protected

◆ uncommitted_entries

std::vector<PendingTx> ccf::indexing::Indexer::uncommitted_entries
protected

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