190 template<typename... Knobs>
192 (Apply(std::move(knobs)), ...);
217 m_chunk = knob.Value();
225 m_high_water = knob.Value();
228 template<
typename Knob>
229 void Apply(Knob&&) =
delete;
231 std::optional<StormByte::ByteSize> m_chunk;
232 std::optional<StormByte::ByteSize> m_high_water;
273 void Cancel() noexcept;
279 bool Canceled() const noexcept;
285 bool EoF() const noexcept;
291 bool Failed() const noexcept;
298 void Toggle() noexcept;
322 std::unique_ptr<Backend::
Pumper> m_backend;
Private worker for StormByte::Buffer::Pumper.
Manual bridge between two StormByte-Buffer ends.
Definition bridge.hxx:156
Pumper cycle size.
Definition pumper.hxx:80
STORMBYTE_FORCE_INLINE StormByte::ByteSize Value() const noexcept
Cycle size.
Definition pumper.hxx:93
STORMBYTE_FORCE_INLINE Chunk(const StormByte::ByteSize value) noexcept
Store the cycle size.
Definition pumper.hxx:86
Input occupancy cap for Pumper.
Definition pumper.hxx:109
STORMBYTE_FORCE_INLINE HighWater(const StormByte::ByteSize value) noexcept
Store the input cap.
Definition pumper.hxx:115
STORMBYTE_FORCE_INLINE StormByte::ByteSize Value() const noexcept
Input cap.
Definition pumper.hxx:122
Optional Pumper knobs.
Definition pumper.hxx:178
STORMBYTE_FORCE_INLINE Parameters() noexcept=default
No knobs.
STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & Chunk() const noexcept
Cycle size when the caller set it.
Definition pumper.hxx:199
STORMBYTE_FORCE_INLINE const std::optional< StormByte::ByteSize > & HighWater() const noexcept
Input cap when the caller set it.
Definition pumper.hxx:207
Owns a Bridge and moves bytes until EoF, failure or Cancel.
Definition pumper.hxx:168
STORMBYTE_FORCE_INLINE Pumper(Bridge &&bridge, Parameters parameters={})
Take a Bridge and start the worker.
Definition pumper.hxx:240
Pumper(Pumper &&other) noexcept
Move constructor.
Pumper(const Pumper &)=delete
~Pumper() noexcept
Destructor.
Basic read counters.
Definition telemetry.hxx:141
Basic write counters.
Definition telemetry.hxx:181
Root namespace of the StormByte C++ suite.
#define STORMBYTE_BUFFER_PUBLIC
Definition visibility.h:54