pub struct CommandQueues { /* private fields */ }Expand description
Bounded, priority-aware command queues for a station or gateway shard.
Implementations§
Source§impl CommandQueues
impl CommandQueues
Sourcepub fn new(limits: CommandQueueLimits) -> Self
pub fn new(limits: CommandQueueLimits) -> Self
Creates empty command queues.
Sourcepub fn push(
&mut self,
command: CommandEnvelope,
ingress: CommandIngress,
) -> Result<CommandPushOutcome, CommandQueueError>
pub fn push( &mut self, command: CommandEnvelope, ingress: CommandIngress, ) -> Result<CommandPushOutcome, CommandQueueError>
Pushes a command through the barrier-aware ingress policy.
Sourcepub fn release_barrier_buffer(&mut self) -> Result<usize, CommandQueueError>
pub fn release_barrier_buffer(&mut self) -> Result<usize, CommandQueueError>
Moves commands buffered by a barrier back into priority queues.
If a target priority queue is full, the first blocked command and all commands after it remain in the barrier buffer for a later retry.
Sourcepub fn clear_barrier_buffer(&mut self) -> usize
pub fn clear_barrier_buffer(&mut self) -> usize
Drops commands buffered by a barrier.
Sourcepub fn pop_next(&mut self) -> Option<CommandEnvelope>
pub fn pop_next(&mut self) -> Option<CommandEnvelope>
Pops the next command, preferring high priority.
Sourcepub fn barrier_buffer_len(&self) -> usize
pub fn barrier_buffer_len(&self) -> usize
Returns command count buffered by an active barrier.
Sourcepub fn ready_retained_capacity(&self, priority: CommandPriority) -> usize
pub fn ready_retained_capacity(&self, priority: CommandPriority) -> usize
Returns slots retained by one ready priority queue.
Sourcepub fn total_ready_retained_capacity(&self) -> usize
pub fn total_ready_retained_capacity(&self) -> usize
Returns slots retained across all ready priority queues.
Sourcepub fn barrier_buffer_retained_capacity(&self) -> usize
pub fn barrier_buffer_retained_capacity(&self) -> usize
Returns slots retained by the barrier buffer.
Sourcepub fn reclaim_retained_capacity(&mut self)
pub fn reclaim_retained_capacity(&mut self)
Releases unused retained queue storage without changing queued commands.
Sourcepub fn barrier_buffer_capacity(&self) -> usize
pub fn barrier_buffer_capacity(&self) -> usize
Maximum commands retained while a barrier buffers ingress.
The buffer uses the saturating sum of the three ready-queue limits so integrations get a bounded default without a separate hidden capacity.
Trait Implementations§
Source§impl Clone for CommandQueues
impl Clone for CommandQueues
Source§fn clone(&self) -> CommandQueues
fn clone(&self) -> CommandQueues
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more