morph 0.1.0
Asynchronous bridge between GUI thread and business models
Loading...
Searching...
No Matches
morph::offline::OfflineQueueFullError Struct Reference

Thrown by enqueue() when the queue is at its configured maxDepth(). More...

#include <offline_queue.hpp>

Inheritance diagram for morph::offline::OfflineQueueFullError:

Public Member Functions

 OfflineQueueFullError (std::size_t maxDepthValue, std::size_t currentSizeValue)

Public Attributes

std::size_t maxDepth
 The configured capacity that was reached.
std::size_t currentSize
 Number of pending items at the time of rejection.

Detailed Description

Thrown by enqueue() when the queue is at its configured maxDepth().

IOfflineQueue enforces a reject-newest overflow policy: once the queue holds maxDepth() items, a further enqueue() throws instead of silently evicting an older item or invoking an app-defined callback. Evicting the oldest item would destroy data the caller believes durable and break replay ordering with no error raised anywhere; a host that genuinely wants different eviction semantics already has the seam for it — subclass IOfflineQueue directly rather than layering a second policy mechanism on top of this one.

Definition at line 144 of file offline_queue.hpp.

Constructor & Destructor Documentation

◆ OfflineQueueFullError()

morph::offline::OfflineQueueFullError::OfflineQueueFullError ( std::size_t maxDepthValue,
std::size_t currentSizeValue )
inline
Parameters
maxDepthValueThe configured capacity that was reached.
currentSizeValueNumber of pending items at the time of rejection (equal to maxDepth for a well-behaved implementation).

Definition at line 148 of file offline_queue.hpp.

Member Data Documentation

◆ maxDepth

std::size_t morph::offline::OfflineQueueFullError::maxDepth

The configured capacity that was reached.

Definition at line 155 of file offline_queue.hpp.

◆ currentSize

std::size_t morph::offline::OfflineQueueFullError::currentSize

Number of pending items at the time of rejection.

Definition at line 157 of file offline_queue.hpp.


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