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

 WriterParameters ()=default
 No knobs.
template<typename... Knobs>
 WriterParameters (Knobs... knobs)
 Engage the listed knobs.
 WriterParameters (const WriterParameters &other)=default
 Copy Safe-owned optional knobs; may allocate and throw.
 WriterParameters (WriterParameters &&other) noexcept=default
 Transfer Safe-owned optional knobs.
 ~WriterParameters () noexcept=default
 Release optional knobs through provider callbacks.
WriterParameters & operator= (const WriterParameters &other)=default
 Copy Safe-owned optional knobs; may allocate and throw.
WriterParameters & operator= (WriterParameters &&other) noexcept=default
 Transfer Safe-owned optional knobs.
const StormByte::Safe::Optional< StormByte::ByteSize > & WriteTransfer () const noexcept
 Universal push maximum when the caller supplied it.
const StormByte::Safe::Optional< StormByte::ByteSize > & WriteThreshold () const noexcept
 Page-drain watermark when the caller supplied it.
const StormByte::Safe::Optional< StormByte::ByteSize > & WriteChunk () const noexcept
 Chunk size when the caller set it.
const StormByte::Safe::Optional< std::size_t > & BackPressure () const noexcept
 Backpressure when the caller set it.
const StormByte::Safe::Optional< StormByte::ByteSize > & MaxMemory () const noexcept
 Dirty-page budget 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 writer knobs.

A missing field keeps the current default.

Nested Parameters on BufferedWriter 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

◆ WriterParameters() [1/4]

StormByte::Buffer::IO::WriterParameters::WriterParameters ( )
default

No knobs.

Every field is absent.

◆ WriterParameters() [2/4]

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

Engage the listed knobs.

Unknown types do not compile.

Template Parameters
KnobsWriteChunk, BackPressure, MaxMemory, MaxWait, WriteTransfer or WriteThreshold.
Parameters
knobsValues to store.

◆ WriterParameters() [3/4]

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

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

Parameters
otherSource knobs.

◆ WriterParameters() [4/4]

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

Transfer Safe-owned optional knobs.

Parameters
otherSource knobs.

◆ ~WriterParameters()

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

Release optional knobs through provider callbacks.

Member Function Documentation

◆ BackPressure()

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

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

const StormByte::Safe::Optional< std::chrono::milliseconds::rep > & StormByte::Buffer::IO::WriterParameters::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]

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

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

Parameters
otherSource knobs.
Returns
This parameter bag.

◆ operator=() [2/2]

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

Transfer Safe-owned optional knobs.

Parameters
otherSource knobs.
Returns
This parameter bag.

◆ WriteChunk()

const StormByte::Safe::Optional< StormByte::ByteSize > & StormByte::Buffer::IO::WriterParameters::WriteChunk ( ) const
inlinenoexcept

Chunk size when the caller set it.

Returns
Empty when the caller omitted WriteChunk.

◆ WriteThreshold()

const StormByte::Safe::Optional< StormByte::ByteSize > & StormByte::Buffer::IO::WriterParameters::WriteThreshold ( ) const
inlinenoexcept

Page-drain watermark when the caller supplied it.

Returns
Empty when the caller omitted WriteThreshold.

◆ WriteTransfer()

const StormByte::Safe::Optional< StormByte::ByteSize > & StormByte::Buffer::IO::WriterParameters::WriteTransfer ( ) const
inlinenoexcept

Universal push maximum when the caller supplied it.

Returns
Empty when the caller omitted WriteTransfer.

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