StormByte-Buffer 4.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

 ReaderParameters ()=default
 No knobs.
template<typename... Knobs>
 ReaderParameters (Knobs... knobs)
 Engage the listed knobs.
 ReaderParameters (const ReaderParameters &other)=default
 Copy Safe-owned optional knobs; may allocate and throw.
 ReaderParameters (ReaderParameters &&other) noexcept=default
 Transfer Safe-owned optional knobs.
 ~ReaderParameters () noexcept=default
 Release optional knobs through provider callbacks.
ReaderParameters & operator= (const ReaderParameters &other)=default
 Copy Safe-owned optional knobs; may allocate and throw.
ReaderParameters & operator= (ReaderParameters &&other) noexcept=default
 Transfer Safe-owned optional knobs.
const StormByte::Safe::Optional< StormByte::ByteSize > & ReadChunk () const noexcept
 Origin request maximum when the caller supplied it.
const StormByte::Safe::Optional< StormByte::ByteSize > & ReadAhead () const noexcept
 Prefetch length when the caller set it.
const StormByte::Safe::Optional< StormByte::ByteSize > & MaxMemory () const noexcept
 Cache cap when the caller set it.
const StormByte::Safe::Optional< std::chrono::milliseconds::rep > & MaxWait () const noexcept
 Signed millisecond count when the caller set the wait cap.

Detailed Description

Optional reader knobs.

A missing field keeps the current default.

Nested Parameters on BufferedReader and its children inherit this type. Safe-owned values retain provider-side lifecycle.

Note
Construction, copying and knob assignment may allocate and throw.

Constructor & Destructor Documentation

◆ ReaderParameters() [1/4]

StormByte::Buffer::IO::ReaderParameters::ReaderParameters ( )
default

No knobs.

Every field is absent.

◆ ReaderParameters() [2/4]

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

Engage the listed knobs.

Unknown types do not compile.

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

◆ ReaderParameters() [3/4]

StormByte::Buffer::IO::ReaderParameters::ReaderParameters ( const ReaderParameters & other)
default

Copy Safe-owned optional knobs; may allocate and throw.

Parameters
otherSource knobs.

◆ ReaderParameters() [4/4]

StormByte::Buffer::IO::ReaderParameters::ReaderParameters ( ReaderParameters && other)
defaultnoexcept

Transfer Safe-owned optional knobs.

Parameters
otherSource knobs.

◆ ~ReaderParameters()

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

Release optional knobs through provider callbacks.

Member Function Documentation

◆ MaxMemory()

const StormByte::Safe::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()

const StormByte::Safe::Optional< std::chrono::milliseconds::rep > & StormByte::Buffer::IO::ReaderParameters::MaxWait ( ) const
inlinenoexcept

Signed millisecond count when the caller set the wait cap.

Returns
Empty when omitted; an engaged zero means unlimited wait.

◆ operator=() [1/2]

ReaderParameters & StormByte::Buffer::IO::ReaderParameters::operator= ( const ReaderParameters & other)
default

Copy Safe-owned optional knobs; may allocate and throw.

Parameters
otherSource knobs.
Returns
This parameter bag.

◆ operator=() [2/2]

ReaderParameters & StormByte::Buffer::IO::ReaderParameters::operator= ( ReaderParameters && other)
defaultnoexcept

Transfer Safe-owned optional knobs.

Parameters
otherSource knobs.
Returns
This parameter bag.

◆ ReadAhead()

const StormByte::Safe::Optional< StormByte::ByteSize > & StormByte::Buffer::IO::ReaderParameters::ReadAhead ( ) const
inlinenoexcept

Prefetch length when the caller set it.

Returns
Empty when the caller omitted ReadAhead.

◆ ReadChunk()

const StormByte::Safe::Optional< StormByte::ByteSize > & StormByte::Buffer::IO::ReaderParameters::ReadChunk ( ) const
inlinenoexcept

Origin request maximum when the caller supplied it.

Returns
Empty when the caller omitted ReadChunk.

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