pub struct CheckpointCoalescer { /* private fields */ }Expand description
Tracks high-water seq per subscription partition; flushes periodically.
Implementations§
Source§impl CheckpointCoalescer
impl CheckpointCoalescer
Sourcepub fn new(port: Arc<dyn StoragePort>) -> Self
pub fn new(port: Arc<dyn StoragePort>) -> Self
Start a background flush loop bound to port.
Sourcepub fn attach_reclaimer(&self, reclaimer: Arc<dyn PartitionReclaim>)
pub fn attach_reclaimer(&self, reclaimer: Arc<dyn PartitionReclaim>)
Wire opportunistic reclaim after checkpoint commits.
Sourcepub async fn record(
&self,
subscription_name: &str,
topic_name: &str,
topic_key: Option<&str>,
seq: i64,
) -> Result<()>
pub async fn record( &self, subscription_name: &str, topic_name: &str, topic_key: Option<&str>, seq: i64, ) -> Result<()>
Record delivered seq; may trigger immediate flush when batch threshold hit.
§Errors
Returns an error if the operation fails.
Sourcepub async fn pending_min_seq(
&self,
topic: &str,
topic_key: Option<&str>,
) -> Option<i64>
pub async fn pending_min_seq( &self, topic: &str, topic_key: Option<&str>, ) -> Option<i64>
Minimum unflushed seq for a storage partition.
Sourcepub async fn pending_partitions(&self) -> Vec<TopicPartition>
pub async fn pending_partitions(&self) -> Vec<TopicPartition>
Storage partitions with unflushed checkpoint state.
Auto Trait Implementations§
impl !RefUnwindSafe for CheckpointCoalescer
impl !UnwindSafe for CheckpointCoalescer
impl Freeze for CheckpointCoalescer
impl Send for CheckpointCoalescer
impl Sync for CheckpointCoalescer
impl Unpin for CheckpointCoalescer
impl UnsafeUnpin for CheckpointCoalescer
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