Skip to main content

QueryIncomingEnvelope

Trait QueryIncomingEnvelope 

Source
pub trait QueryIncomingEnvelope: ConnectionExt + Sized {
Show 18 methods // Provided methods fn record_welcome_discovery( &self, group_id: GroupId, welcome_cursor: Cursor, ) -> Result<(), StorageError> { ... } fn group_ids_discovered_through( &self, target: Cursor, ) -> Result<Vec<GroupId>, StorageError> { ... } fn record_terminal_rejection( &self, topic: &StreamTopic, sequence: Cursor, code: &'static str, ) -> Result<(), StorageError> { ... } fn read_last_rejection( &self, topic: &StreamTopic, ) -> Result<Option<TerminalRejection>, StorageError> { ... } fn admit_ordered_batch( &self, topic: &StreamTopic, after: Cursor, envelopes: &[NewIncomingEnvelope], limits: IncomingLimits, ) -> Result<AdmissionResult, StorageError> { ... } fn topic_progress( &self, topic: &StreamTopic, ) -> Result<TopicProgress, StorageError> { ... } fn first_pending_envelope( &self, topic: &StreamTopic, ) -> Result<Option<StoredIncomingEnvelope>, StorageError> { ... } fn pending_envelope( &self, topic: &StreamTopic, sequence: Cursor, ) -> Result<Option<StoredIncomingEnvelope>, StorageError> { ... } fn pending_states_through( &self, topic: &StreamTopic, target: Cursor, ) -> Result<Vec<PendingEnvelopeState>, StorageError> { ... } fn complete_pending_envelope( &self, topic: &StreamTopic, sequence: Cursor, ) -> Result<bool, StorageError> { ... } fn set_incoming_retry( &self, topic: &StreamTopic, sequence: Cursor, retry: &IncomingRetry, ) -> Result<bool, StorageError> { ... } fn ready_welcomes( &self, now_ns: i64, limit: u32, ) -> Result<Vec<StoredIncomingEnvelope>, StorageError> { ... } fn ready_welcomes_bounded( &self, now_ns: i64, limit: u32, max_bytes: u64, ) -> Result<Vec<StoredIncomingEnvelope>, StorageError> { ... } fn blocked_welcomes_bounded( &self, topic: &StreamTopic, after: Cursor, limit: u32, max_bytes: u64, ) -> Result<Vec<StoredIncomingEnvelope>, StorageError> { ... } fn welcome_barrier_complete( &self, topic: &StreamTopic, target: Cursor, ) -> Result<bool, StorageError> { ... } fn has_pending_welcomes(&self) -> Result<bool, StorageError> { ... } fn install_group_anchor( &self, group_id: GroupId, anchor: Cursor, mode: JoinAnchorMode, ) -> Result<(), StorageError> { ... } fn pending_topic_usage( &self, kind: NetworkEntityKind, ) -> Result<Vec<PendingTopicUsage>, StorageError> { ... }
}
Expand description

Atomic receipt, ordered completion, and bounded retry state for network logs.

Provided Methods§

Source

fn record_welcome_discovery( &self, group_id: GroupId, welcome_cursor: Cursor, ) -> Result<(), StorageError>

Record the first successful Welcome installation inside its state transaction. Rejoin does not change discovery. Local creation and history import do not call this.

Source

fn group_ids_discovered_through( &self, target: Cursor, ) -> Result<Vec<GroupId>, StorageError>

Groups first discovered through the fixed own-installation Welcome target. Later joins and local/imported groups cannot expand this captured discovery set.

Source

fn record_terminal_rejection( &self, topic: &StreamTopic, sequence: Cursor, code: &'static str, ) -> Result<(), StorageError>

Keep one rejection diagnostic per topic, replacing it with a later rejection. Store a stable error code, never an input payload or a formatted error message. The caller records this inside the same state transaction that deletes the pending row.

Source

fn read_last_rejection( &self, topic: &StreamTopic, ) -> Result<Option<TerminalRejection>, StorageError>

Read the topic’s last committed rejection code without loading envelope data.

Source

fn admit_ordered_batch( &self, topic: &StreamTopic, after: Cursor, envelopes: &[NewIncomingEnvelope], limits: IncomingLimits, ) -> Result<AdmissionResult, StorageError>

Commit the complete ordered batch and its received position together. An overlap is safe; a gap before the source cursor is rejected. Validation, capacity, or storage failure leaves both F and pending rows unchanged.

Source

fn topic_progress( &self, topic: &StreamTopic, ) -> Result<TopicProgress, StorageError>

Read P and F from the same row; an unseen topic starts at zero.

Source

fn first_pending_envelope( &self, topic: &StreamTopic, ) -> Result<Option<StoredIncomingEnvelope>, StorageError>

Read the next actual ID. Missing integer IDs are not queue entries.

Source

fn pending_envelope( &self, topic: &StreamTopic, sequence: Cursor, ) -> Result<Option<StoredIncomingEnvelope>, StorageError>

Recheck one independent welcome under the caller’s state transaction.

Source

fn pending_states_through( &self, topic: &StreamTopic, target: Cursor, ) -> Result<Vec<PendingEnvelopeState>, StorageError>

Read actual pending IDs through the fixed target without loading ciphertext. Topic and kind admission limits bound the number of stored rows returned here.

Source

fn complete_pending_envelope( &self, topic: &StreamTopic, sequence: Cursor, ) -> Result<bool, StorageError>

Complete only the current group or identity head. Welcomes are independent. Call this inside the state transaction that applies or rejects the envelope. Deletion and P advance commit together; an unresolved Welcome keeps its prefix open.

Source

fn set_incoming_retry( &self, topic: &StreamTopic, sequence: Cursor, retry: &IncomingRetry, ) -> Result<bool, StorageError>

Retry metadata is written only while this work is still current.

Source

fn ready_welcomes( &self, now_ns: i64, limit: u32, ) -> Result<Vec<StoredIncomingEnvelope>, StorageError>

Read due, unblocked Welcome rows. Production callers must also set a byte bound.

Source

fn ready_welcomes_bounded( &self, now_ns: i64, limit: u32, max_bytes: u64, ) -> Result<Vec<StoredIncomingEnvelope>, StorageError>

Read a due prefix without loading envelope bytes above the batch budget. Permanently blocked rows require a new coordinator generation, not a timer retry.

Source

fn blocked_welcomes_bounded( &self, topic: &StreamTopic, after: Cursor, limit: u32, max_bytes: u64, ) -> Result<Vec<StoredIncomingEnvelope>, StorageError>

Read one bounded page for a new coordinator generation to recheck unsupported work.

Source

fn welcome_barrier_complete( &self, topic: &StreamTopic, target: Cursor, ) -> Result<bool, StorageError>

Later welcome success cannot hide an earlier unresolved welcome.

Source

fn has_pending_welcomes(&self) -> Result<bool, StorageError>

Keep welcome private keys while any unresolved welcome can still need them.

Source

fn install_group_anchor( &self, group_id: GroupId, anchor: Cursor, mode: JoinAnchorMode, ) -> Result<(), StorageError>

Install a validated join anchor without rewinding either durable position. The caller must check the group state and install MLS state in the same transaction.

Source

fn pending_topic_usage( &self, kind: NetworkEntityKind, ) -> Result<Vec<PendingTopicUsage>, StorageError>

Largest queues come first; empty topics are absent and must not be paused.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§