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

Cache loading interface. More...

#include <CacheLoader.hpp>

Public Member Functions

 CacheLoader (util::config::ClioConfigDefinition const &config, std::shared_ptr< BackendInterface > const &backend, CacheType &cache)
 Construct a new Cache Loader object.
 
void load (uint32_t const seq)
 Load the cache for the given sequence number.
 
void stop () noexcept
 Requests the loader to stop asap.
 
void wait () noexcept
 Waits for the loader to finish background work.
 

Detailed Description

template<typename CacheType, typename ExecutionContextType = util::async::CoroExecutionContext>
class etl::CacheLoader< CacheType, 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 CacheType , typename ExecutionContextType = util::async::CoroExecutionContext>
etl::CacheLoader< CacheType, ExecutionContextType >::CacheLoader ( util::config::ClioConfigDefinition const & config,
std::shared_ptr< BackendInterface > const & backend,
CacheType & 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 CacheType , typename ExecutionContextType = util::async::CoroExecutionContext>
void etl::CacheLoader< CacheType, ExecutionContextType >::load ( uint32_t const seq)
inline

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

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