pub struct InProcessBackend { /* private fields */ }Expand description
In-process, non-durable state backend.
Implementations§
Trait Implementations§
Source§impl Debug for InProcessBackend
impl Debug for InProcessBackend
Source§impl StateBackend for InProcessBackend
impl StateBackend for InProcessBackend
Source§fn write_partial<'life0, 'async_trait>(
&'life0 self,
vnode: u32,
epoch: u64,
_assignment_version: u64,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn write_partial<'life0, 'async_trait>(
&'life0 self,
vnode: u32,
epoch: u64,
_assignment_version: u64,
bytes: Bytes,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
In-process backend opts out of the split-brain fence — there’s
only one process so the scenario is moot. assignment_version
is accepted and ignored.
Source§fn read_partial<'life0, 'async_trait>(
&'life0 self,
vnode: u32,
epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn read_partial<'life0, 'async_trait>(
&'life0 self,
vnode: u32,
epoch: u64,
) -> Pin<Box<dyn Future<Output = Result<Option<Bytes>, StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Read the partial aggregate for
(vnode, epoch), if any.Source§fn epoch_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: u64,
vnodes: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<bool, StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn epoch_complete<'life0, 'life1, 'async_trait>(
&'life0 self,
epoch: u64,
vnodes: &'life1 [u32],
) -> Pin<Box<dyn Future<Output = Result<bool, StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Durability barrier: returns true iff every
vnode in the set
has a partial persisted for epoch. Read moreSource§fn prune_before<'life0, 'async_trait>(
&'life0 self,
before: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn prune_before<'life0, 'async_trait>(
&'life0 self,
before: u64,
) -> Pin<Box<dyn Future<Output = Result<(), StateBackendError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Garbage-collect every partial and commit marker whose epoch is
strictly less than
before. Called by the checkpoint
coordinator after a successful checkpoint commit so the backend
does not retain state for epochs that can never be recovered. Read moreRaise the backend’s authoritative assignment version — the
minimum
VnodeRegistry::assignment_version it will accept on
write_partial. Hosts call this on boot
after adopting an AssignmentSnapshot and on each subsequent
rotation so stale writers from a deposed leader are fenced out. Read moreCurrent authoritative assignment version.
0 means the fence is
disabled — every caller version is accepted. Backends that do
not fence return 0 unconditionally.Auto Trait Implementations§
impl !Freeze for InProcessBackend
impl !RefUnwindSafe for InProcessBackend
impl Send for InProcessBackend
impl Sync for InProcessBackend
impl Unpin for InProcessBackend
impl UnsafeUnpin for InProcessBackend
impl UnwindSafe for InProcessBackend
Blanket Implementations§
§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Returns the layout of the type.