pub struct ElasticQueue { /* private fields */ }Expand description
The per-route elastic overflow buffer. Reserved for system use — the
route manager drives it; do not use directly in application code (Java
carries the same warning on ServiceQueue).
Implementations§
Source§impl ElasticQueue
impl ElasticQueue
pub fn id(&self) -> &str
pub fn read_counter(&self) -> u64
pub fn write_counter(&self) -> u64
Sourcepub fn is_closed(&self) -> bool
pub fn is_closed(&self) -> bool
The queue is closed when the counters are reset (Java isClosed).
Sourcepub fn write(&mut self, event: &[u8]) -> Result<(), AppError>
pub fn write(&mut self, event: &[u8]) -> Result<(), AppError>
Append one serialized event: memory tier first, then disk spill
(Java write). Empty payloads are ignored.
Sourcepub fn peek(&mut self) -> Result<Vec<u8>, AppError>
pub fn peek(&mut self) -> Result<Vec<u8>, AppError>
Look at the next event without consuming it (Java peek).
Trait Implementations§
Source§impl Drop for ElasticQueue
impl Drop for ElasticQueue
Auto Trait Implementations§
impl Freeze for ElasticQueue
impl RefUnwindSafe for ElasticQueue
impl Send for ElasticQueue
impl Sync for ElasticQueue
impl Unpin for ElasticQueue
impl UnsafeUnpin for ElasticQueue
impl UnwindSafe for ElasticQueue
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more