44#include <StormByte/type_traits/safe.hxx>
48#include <StormByte/safe/pointers.hxx>
49#include <StormByte/safe/string.hxx>
50#include <StormByte/system/device.hxx>
141 template<
typename... Knobs>
235 parameters.
MaxMemory().value_or(default_memory),
236 parameters.
MaxWait().value_or(0)},
237 m_probe(!parameters.
ReadAhead().has_value()) {}
Private state of StormByte::Buffer::IO::BufferedLocationReader.
Location-reader knobs.
Definition buffered_location_reader.hxx:129
Parameters()=default
Construct an empty Safe-owned parameter bag.
Parameters(Parameters &&other) noexcept=default
Transfer Safe-owned knobs.
Parameters(const Parameters &other)=default
Copy Safe-owned knobs; may allocate and throw.
~Parameters() noexcept=default
Release knobs through provider callbacks.
Parameters(Knobs... knobs)
Store reader knobs in Safe-owned optional values.
Definition buffered_location_reader.hxx:142
bool OriginHasSize() const noexcept final
A location has a length.
virtual bool OriginDeviceUsable(const StormByte::Safe::Shared< StormByte::System::Device > &device) const noexcept
Whether Setup may read windows from device.
bool OriginCanSeek() const noexcept final
A location can seek.
virtual StormByte::Safe::Shared< StormByte::System::Device > OriginDevice() const =0
Leaf measurement.
StormByte::Safe::Shared< StormByte::System::Device > Device() const
Measurement of this location.
BufferedLocationReader(const BufferedLocationReader &)=delete
Copy constructor is deleted.
void Setup() final
Apply the device read window when the constructor asked for a probe.
Reader knobs.
Definition buffered_reader.hxx:225
StormByte::ByteSize ReadAhead() const noexcept
Configured prefetch length in bytes.
enum Location Location() const noexcept
Where Path points.
StormByte::ByteSize MaxMemory() const noexcept
Configured cache memory cap in bytes.
friend class StormByte::Buffer::Backend::IO::BufferedReader
Definition buffered_reader.hxx:215
StormByte::ByteSize ReadChunk() const noexcept
Maximum request passed to the origin.
std::chrono::milliseconds MaxWait() const noexcept
Configured read wait limit.
STORMBYTE_DECLARE_MAYBE_SAFE(class StormByte::System::Device::Access)
PIMPL coordinators for the public IO types.
PIMPL coordinators for public Buffer types that are not IO.
Buffered binary sources and sinks.
Buffer module of the StormByte suite.
Root namespace of the StormByte C++ suite.
Knobs after Parameters has been unpacked.
Definition buffered_location_reader.hxx:221
bool m_probe
Probe the read window during Setup.
Definition buffered_location_reader.hxx:271
Unpacked(const Unpacked &other) noexcept=default
Copy resolved knobs.
ReaderConfiguration m_configuration
Complete resolved reader policy.
Definition buffered_location_reader.hxx:270
Unpacked(Unpacked &&other) noexcept=default
Move resolved knobs.
~Unpacked() noexcept=default
Destroy non-owning knobs.
STORMBYTE_FORCE_INLINE Unpacked(const Parameters ¶meters, StormByte::ByteSize default_memory=StormByte::ByteSize{0})
Unpack a bag in the caller.
Definition buffered_location_reader.hxx:230
Complete non-owning reader policy; scalar time crosses the DLL.
Definition parameters.hxx:234
#define STORMBYTE_BUFFER_PUBLIC
Definition visibility.h:54