pub struct QuorumTracker { /* private fields */ }Expand description
Tracks store acknowledgements for quorum satisfaction.
Implementations§
Source§impl QuorumTracker
impl QuorumTracker
Sourcepub fn new(policy: QuorumPolicy) -> Self
pub fn new(policy: QuorumPolicy) -> Self
Create a new tracker for the given policy.
Sourcepub fn record_acceptance(&mut self, store_id: u32)
pub fn record_acceptance(&mut self, store_id: u32)
Record that store store_id has accepted sufficient symbols.
Sourcepub fn is_satisfied(&self) -> bool
pub fn is_satisfied(&self) -> bool
Check if quorum is satisfied.
Sourcepub fn accepted_count(&self) -> usize
pub fn accepted_count(&self) -> usize
Number of stores that have accepted.
Sourcepub const fn policy(&self) -> &QuorumPolicy
pub const fn policy(&self) -> &QuorumPolicy
Policy reference.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QuorumTracker
impl RefUnwindSafe for QuorumTracker
impl Send for QuorumTracker
impl Sync for QuorumTracker
impl Unpin for QuorumTracker
impl UnsafeUnpin for QuorumTracker
impl UnwindSafe for QuorumTracker
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, _span: NoopSpan) -> Self
fn instrument(self, _span: NoopSpan) -> Self
Instruments this future with a span (no-op when disabled).
Source§fn in_current_span(self) -> Self
fn in_current_span(self) -> Self
Instruments this future with the current span (no-op when disabled).