Clio develop
The XRP Ledger API server.
Loading...
Searching...
No Matches
etl::CacheLoader< ExecutionContextType > Class Template Reference

Cache loading interface. More...

#include <CacheLoader.hpp>

Inheritance diagram for etl::CacheLoader< ExecutionContextType >:
Collaboration diagram for etl::CacheLoader< ExecutionContextType >:

Public Member Functions

 CacheLoader (util::config::ClioConfigDefinition const &config, std::shared_ptr< BackendInterface > backend, data::LedgerCacheInterface &cache)
 Construct a new Cache Loader object.
 
void load (uint32_t const seq) override
 Load the cache for the given sequence number.
 
void stop () noexcept override
 Requests the loader to stop asap.
 
void wait () noexcept override
 Waits for the loader to finish background work.
 
- Public Member Functions inherited from etlng::CacheLoaderInterface

Detailed Description

template<typename ExecutionContextType = util::async::CoroExecutionContext>
class etl::CacheLoader< ExecutionContextType >

Cache loading interface.

This class is responsible for loading the cache for a given sequence number.

Template Parameters
CacheTypeThe type of the cache to load
CursorProviderTypeThe type of the cursor provider to use
ExecutionContextTypeThe type of the execution context to use

Constructor & Destructor Documentation

◆ CacheLoader()

template<typename ExecutionContextType = util::async::CoroExecutionContext>
etl::CacheLoader< ExecutionContextType >::CacheLoader ( util::config::ClioConfigDefinition const & config,
std::shared_ptr< BackendInterface > backend,
data::LedgerCacheInterface & cache )
inline

Construct a new Cache Loader object.

Parameters
configThe configuration to use
backendThe backend to use
cacheThe cache to load into

Member Function Documentation

◆ load()

template<typename ExecutionContextType = util::async::CoroExecutionContext>
void etl::CacheLoader< ExecutionContextType >::load ( uint32_t const seq)
inlineoverridevirtual

Load the cache for the given sequence number.

This function is blocking if the cache load style is set to sync and disables the cache entirely if the load style is set to none/no.

Parameters
seqThe sequence number to load cache for

Implements etlng::CacheLoaderInterface.

◆ stop()

template<typename ExecutionContextType = util::async::CoroExecutionContext>
void etl::CacheLoader< ExecutionContextType >::stop ( )
inlineoverridevirtualnoexcept

Requests the loader to stop asap.

Implements etlng::CacheLoaderInterface.

◆ wait()

template<typename ExecutionContextType = util::async::CoroExecutionContext>
void etl::CacheLoader< ExecutionContextType >::wait ( )
inlineoverridevirtualnoexcept

Waits for the loader to finish background work.

Implements etlng::CacheLoaderInterface.


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