StormByte-Buffer 2.0.0
C++26 buffer module of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Buffer::IO::ReaderParameters Class Reference

Optional reader knobs. More...

#include <StormByte/buffer/io/parameters.hxx>

Inheritance diagram for StormByte::Buffer::IO::ReaderParameters:

Public Member Functions

STORMBYTE_FORCE_INLINE ReaderParameters () noexcept=default
 No knobs.
 
template<typename... Knobs>
STORMBYTE_FORCE_INLINE ReaderParameters (Knobs... knobs)
 Engage the listed knobs.
 
STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & ReadAhead () const noexcept
 Prefetch length when the caller set it.
 
STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & MaxMemory () const noexcept
 Cache cap when the caller set it.
 
STORMBYTE_FORCE_INLINE const std::optional< std::chrono::milliseconds > & MaxWait () const noexcept
 Wait cap when the caller set it.
 

Detailed Description

Optional reader knobs.

A missing field keeps the current default.

Nested Parameters on BufferedReader and its children inherit this type. Not a DLL type.

Constructor & Destructor Documentation

◆ ReaderParameters() [1/2]

STORMBYTE_FORCE_INLINE StormByte::Buffer::IO::ReaderParameters::ReaderParameters ( )
defaultnoexcept

No knobs.

Every field is absent.

◆ ReaderParameters() [2/2]

template<typename... Knobs>
STORMBYTE_FORCE_INLINE StormByte::Buffer::IO::ReaderParameters::ReaderParameters ( Knobs...  knobs)
inline

Engage the listed knobs.

Unknown types do not compile.

Template Parameters
KnobsReadAhead, MaxMemory and/or MaxWait.
Parameters
knobsValues to store.

Member Function Documentation

◆ MaxMemory()

STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & StormByte::Buffer::IO::ReaderParameters::MaxMemory ( ) const
inlinenoexcept

Cache cap when the caller set it.

Returns
Empty when the caller omitted MaxMemory.

◆ MaxWait()

STORMBYTE_FORCE_INLINE const std::optional< std::chrono::milliseconds > & StormByte::Buffer::IO::ReaderParameters::MaxWait ( ) const
inlinenoexcept

Wait cap when the caller set it.

Returns
Empty when the caller omitted MaxWait.

◆ ReadAhead()

STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & StormByte::Buffer::IO::ReaderParameters::ReadAhead ( ) const
inlinenoexcept

Prefetch length when the caller set it.

Returns
Empty when the caller omitted ReadAhead.

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