pub struct GroupCommit<W: WalLike> { /* private fields */ }Expand description
Leader/follower group-commit coordinator over a shared WalLike target.
Implementations§
Source§impl<W: WalLike> GroupCommit<W>
impl<W: WalLike> GroupCommit<W>
Sourcepub fn new(wal: Arc<W>, config: GroupCommitConfig) -> Self
pub fn new(wal: Arc<W>, config: GroupCommitConfig) -> Self
Create a coordinator over wal with the given config.
pub fn config(&self) -> &GroupCommitConfig
Sourcepub fn stats(&self) -> GroupCommitStats
pub fn stats(&self) -> GroupCommitStats
Current cumulative statistics.
Sourcepub fn flush(&self) -> Result<GroupCommitResult>
pub fn flush(&self) -> Result<GroupCommitResult>
Wait for a durable flush of everything appended so far.
Enqueues this submission, then either leads this group or waits for a leader to include it. Returns once an fsync that started after the enqueue has completed.
Auto Trait Implementations§
impl<W> !Freeze for GroupCommit<W>
impl<W> RefUnwindSafe for GroupCommit<W>where
Arc<W>: RefUnwindSafe,
impl<W> Send for GroupCommit<W>
impl<W> Sync for GroupCommit<W>
impl<W> Unpin for GroupCommit<W>
impl<W> UnsafeUnpin for GroupCommit<W>where
Arc<W>: UnsafeUnpin,
impl<W> UnwindSafe for GroupCommit<W>where
Arc<W>: UnwindSafe,
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more