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

Optional writer knobs. More...

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

Inheritance diagram for StormByte::Buffer::IO::WriterParameters:

Public Member Functions

STORMBYTE_FORCE_INLINE WriterParameters () noexcept=default
 No knobs.
 
template<typename... Knobs>
STORMBYTE_FORCE_INLINE WriterParameters (Knobs... knobs)
 Engage the listed knobs.
 
STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & WriteChunk () const noexcept
 Chunk size when the caller set it.
 
STORMBYTE_FORCE_INLINE const std::optional< std::size_t > & BackPressure () const noexcept
 Backpressure when the caller set it.
 
STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & MaxMemory () const noexcept
 Dirty-page budget 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 writer knobs.

A missing field keeps the current default.

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

Constructor & Destructor Documentation

◆ WriterParameters() [1/2]

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

No knobs.

Every field is absent.

◆ WriterParameters() [2/2]

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

Engage the listed knobs.

Unknown types do not compile.

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

Member Function Documentation

◆ BackPressure()

STORMBYTE_FORCE_INLINE const std::optional< std::size_t > & StormByte::Buffer::IO::WriterParameters::BackPressure ( ) const
inlinenoexcept

Backpressure when the caller set it.

Returns
Empty when the caller omitted BackPressure.

◆ MaxMemory()

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

Dirty-page budget 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::WriterParameters::MaxWait ( ) const
inlinenoexcept

Wait cap when the caller set it.

Returns
Empty when the caller omitted MaxWait.

◆ WriteChunk()

STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & StormByte::Buffer::IO::WriterParameters::WriteChunk ( ) const
inlinenoexcept

Chunk size when the caller set it.

Returns
Empty when the caller omitted WriteChunk.

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