PineForge unreleased
Deterministic PineScript v6 backtest runtime — C ABI reference
Loading...
Searching...
No Matches
pineforge::detail::ReadThroughCache Class Reference

#include <read_through_cache.hpp>

Data Structures

class  ReadLease
 

Public Member Functions

 ReadThroughCache (ReadThroughCachePolicy policy, ReadThroughCacheBacking backing, ReadThroughCacheAllocator allocator={}, ReadThroughCacheTransactionOrder transaction={}) noexcept
 
 ~ReadThroughCache () noexcept
 
 ReadThroughCache (const ReadThroughCache &)=delete
 
ReadThroughCache & operator= (const ReadThroughCache &)=delete
 
 ReadThroughCache (ReadThroughCache &&)=delete
 
ReadThroughCache & operator= (ReadThroughCache &&)=delete
 
ScratchStatus status () const noexcept
 
ReadThroughCachePolicy policy () const noexcept
 
ReadThroughCacheStats stats () const noexcept
 
const ReportScratchIoError * carried_failure () const noexcept
 
std::size_t transfer_workspace_bytes () const noexcept
 
std::size_t slot_count () const noexcept
 
ScratchStatus get (ReadThroughCacheKey key, ScratchBuffer destination) noexcept
 
ReadLease pin (ReadThroughCacheKey key, ScratchBuffer caller_workspace) noexcept
 
void unpin (ReadLease &lease) noexcept
 
ScratchStatus put (ReadThroughCacheKey key, ScratchBytes source) noexcept
 
ScratchStatus invalidate (ReadThroughCacheKey key) noexcept
 
ScratchStatus invalidate_all () noexcept
 
ScratchStatus invalidate_from (std::uint64_t identity, std::uint64_t generation, std::uint64_t byte_offset) noexcept
 
ScratchStatus on_append (std::uint64_t identity, std::uint64_t generation, std::uint64_t old_size_bytes) noexcept
 
ScratchStatus on_truncate (std::uint64_t identity, std::uint64_t generation, std::uint64_t new_size_bytes) noexcept
 
ScratchStatus on_generation_change (std::uint64_t identity, std::uint64_t new_generation) noexcept
 
ScratchStatus rebind (ReadThroughCacheBacking backing) noexcept
 
ScratchStatus flush () noexcept
 
ScratchStatus discard_dirty () noexcept
 

Static Public Member Functions

static std::size_t line_bytes (std::size_t page_size) noexcept
 
static std::size_t control_bytes () noexcept
 

Detailed Description

Definition at line 95 of file read_through_cache.hpp.

Constructor & Destructor Documentation

◆ ReadThroughCache() [1/3]

pineforge::detail::ReadThroughCache::ReadThroughCache ( ReadThroughCachePolicy policy,
ReadThroughCacheBacking backing,
ReadThroughCacheAllocator allocator = {},
ReadThroughCacheTransactionOrder transaction = {} )
inlinenoexcept

Definition at line 134 of file read_through_cache.hpp.

References policy().

Referenced by control_bytes(), operator=(), operator=(), ReadThroughCache(), and ReadThroughCache().

◆ ~ReadThroughCache()

pineforge::detail::ReadThroughCache::~ReadThroughCache ( )
inlinenoexcept

Definition at line 151 of file read_through_cache.hpp.

◆ ReadThroughCache() [2/3]

pineforge::detail::ReadThroughCache::ReadThroughCache ( const ReadThroughCache & )
delete

References ReadThroughCache().

◆ ReadThroughCache() [3/3]

pineforge::detail::ReadThroughCache::ReadThroughCache ( ReadThroughCache && )
delete

References ReadThroughCache().

Member Function Documentation

◆ operator=() [1/2]

ReadThroughCache & pineforge::detail::ReadThroughCache::operator= ( const ReadThroughCache & )
delete

References ReadThroughCache().

◆ operator=() [2/2]

ReadThroughCache & pineforge::detail::ReadThroughCache::operator= ( ReadThroughCache && )
delete

References ReadThroughCache().

◆ status()

ScratchStatus pineforge::detail::ReadThroughCache::status ( ) const
inlinenoexcept

Definition at line 163 of file read_through_cache.hpp.

◆ policy()

ReadThroughCachePolicy pineforge::detail::ReadThroughCache::policy ( ) const
inlinenoexcept

Definition at line 164 of file read_through_cache.hpp.

Referenced by ReadThroughCache().

◆ stats()

ReadThroughCacheStats pineforge::detail::ReadThroughCache::stats ( ) const
inlinenoexcept

Definition at line 165 of file read_through_cache.hpp.

◆ carried_failure()

const ReportScratchIoError * pineforge::detail::ReadThroughCache::carried_failure ( ) const
inlinenoexcept

Definition at line 166 of file read_through_cache.hpp.

◆ line_bytes()

◆ control_bytes()

static std::size_t pineforge::detail::ReadThroughCache::control_bytes ( )
inlinestaticnoexcept

Definition at line 171 of file read_through_cache.hpp.

References ReadThroughCache().

◆ transfer_workspace_bytes()

std::size_t pineforge::detail::ReadThroughCache::transfer_workspace_bytes ( ) const
inlinenoexcept

Definition at line 172 of file read_through_cache.hpp.

◆ slot_count()

std::size_t pineforge::detail::ReadThroughCache::slot_count ( ) const
inlinenoexcept

Definition at line 173 of file read_through_cache.hpp.

◆ get()

ScratchStatus pineforge::detail::ReadThroughCache::get ( ReadThroughCacheKey key,
ScratchBuffer destination )
inlinenoexcept

◆ pin()

ReadLease pineforge::detail::ReadThroughCache::pin ( ReadThroughCacheKey key,
ScratchBuffer caller_workspace )
inlinenoexcept

◆ unpin()

void pineforge::detail::ReadThroughCache::unpin ( ReadLease & lease)
inlinenoexcept

Definition at line 196 of file read_through_cache.hpp.

◆ put()

ScratchStatus pineforge::detail::ReadThroughCache::put ( ReadThroughCacheKey key,
ScratchBytes source )
inlinenoexcept

◆ invalidate()

ScratchStatus pineforge::detail::ReadThroughCache::invalidate ( ReadThroughCacheKey key)
inlinenoexcept

Definition at line 245 of file read_through_cache.hpp.

References pineforge::detail::key.

◆ invalidate_all()

ScratchStatus pineforge::detail::ReadThroughCache::invalidate_all ( )
inlinenoexcept

Definition at line 248 of file read_through_cache.hpp.

Referenced by rebind().

◆ invalidate_from()

ScratchStatus pineforge::detail::ReadThroughCache::invalidate_from ( std::uint64_t identity,
std::uint64_t generation,
std::uint64_t byte_offset )
inlinenoexcept

◆ on_append()

ScratchStatus pineforge::detail::ReadThroughCache::on_append ( std::uint64_t identity,
std::uint64_t generation,
std::uint64_t old_size_bytes )
inlinenoexcept

Definition at line 261 of file read_through_cache.hpp.

References pineforge::detail::generation, and invalidate_from().

◆ on_truncate()

ScratchStatus pineforge::detail::ReadThroughCache::on_truncate ( std::uint64_t identity,
std::uint64_t generation,
std::uint64_t new_size_bytes )
inlinenoexcept

Definition at line 265 of file read_through_cache.hpp.

References pineforge::detail::generation, and invalidate_from().

◆ on_generation_change()

ScratchStatus pineforge::detail::ReadThroughCache::on_generation_change ( std::uint64_t identity,
std::uint64_t new_generation )
inlinenoexcept

◆ rebind()

ScratchStatus pineforge::detail::ReadThroughCache::rebind ( ReadThroughCacheBacking backing)
inlinenoexcept

◆ flush()

ScratchStatus pineforge::detail::ReadThroughCache::flush ( )
inlinenoexcept

◆ discard_dirty()

ScratchStatus pineforge::detail::ReadThroughCache::discard_dirty ( )
inlinenoexcept

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