Struct paxakos::heartbeats::Heartbeats [−][src]
pub struct Heartbeats<N, C, I = ()> where
N: MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N>, { /* fields omitted */ }
Expand description
Heartbeats decoration.
Trait Implementations
impl<N: Debug, C: Debug, I: Debug> Debug for Heartbeats<N, C, I> where
N: MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N>,
impl<N: Debug, C: Debug, I: Debug> Debug for Heartbeats<N, C, I> where
N: MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N>,
impl<N, C, I> Decoration for Heartbeats<N, C, I> where
N: NodeImpl + MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N> + 'static,
impl<N, C, I> Decoration for Heartbeats<N, C, I> where
N: NodeImpl + MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N> + 'static,
type Decorated = N
type Decorated = N
Type of the decorated node.
Wraps this decoration around the given node, using the given arguments.
impl<N, C, I> Node for Heartbeats<N, C, I> where
N: MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N>,
impl<N, C, I> Node for Heartbeats<N, C, I> where
N: MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N>,
type Invocation = InvocationOf<N>
type Invocation = InvocationOf<N>
Parametrization of the paxakos algorithm.
type Communicator = CommunicatorOf<N>
type Communicator = CommunicatorOf<N>
Type of communicator this node uses.
Node’s current status.
Node’s current mode of participation.
Polls the node’s event stream. Read more
fn prepare_snapshot(
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
fn prepare_snapshot(
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
Requests that snapshot of the node’s current state be taken.
fn affirm_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
fn affirm_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
Affirms that the given snapshot was written to persistent storage. Read more
fn install_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
fn install_snapshot(
&self,
snapshot: SnapshotFor<Self>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
Requests that given snapshot be installed.
Reads the node’s current state. Read more
fn append<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'_, AppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
fn append<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'_, AppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
Appends applicable
to the shared log.
fn append_static<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'static, StaticAppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
R::StaticError: From<ShutDownOr<R::Error>>,
fn append_static<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'static, StaticAppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
R::StaticError: From<ShutDownOr<R::Error>>,
Appends applicable
to the shared log.
impl<N, C, I> NodeImpl for Heartbeats<N, C, I> where
N: NodeImpl + MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N>,
impl<N, C, I> NodeImpl for Heartbeats<N, C, I> where
N: NodeImpl + MaybeLeadershipAwareNode<I> + 'static,
C: Config<Node = N>,
fn append_impl<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'static, ImplAppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
fn append_impl<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'static, ImplAppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
Appends applicable
to the shared log.
Auto Trait Implementations
impl<N, C, I = ()> !RefUnwindSafe for Heartbeats<N, C, I>
impl<N, C, I = ()> !Send for Heartbeats<N, C, I>
impl<N, C, I = ()> !Sync for Heartbeats<N, C, I>
impl<N, C, I> Unpin for Heartbeats<N, C, I> where
C: Unpin,
I: Unpin,
N: Unpin,
impl<N, C, I = ()> !UnwindSafe for Heartbeats<N, C, I>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
impl<D, I> LeadershipAwareNode<(I,)> for D where
D: Decoration<Invocation = <<D as Decoration>::Decorated as Node>::Invocation, Communicator = <<D as Decoration>::Decorated as Node>::Communicator> + Node,
<D as Decoration>::Decorated: LeadershipAwareNode<I>,
impl<D, I> LeadershipAwareNode<(I,)> for D where
D: Decoration<Invocation = <<D as Decoration>::Decorated as Node>::Invocation, Communicator = <<D as Decoration>::Decorated as Node>::Communicator> + Node,
<D as Decoration>::Decorated: LeadershipAwareNode<I>,
pub fn lax_leadership(
&Self
) -> &[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]
pub fn lax_leadership(
&Self
) -> &[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]
Leadership as assumed by this node. Read more
pub fn strict_leadership(
&Self
) -> &[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]
pub fn strict_leadership(
&Self
) -> &[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]
Leadership as assumed by this node. Read more
impl<D, I> MasterLeasingNode<(I,)> for D where
D: Decoration<Invocation = <<D as Decoration>::Decorated as Node>::Invocation, Communicator = <<D as Decoration>::Decorated as Node>::Communicator> + Node,
<D as Decoration>::Decorated: MasterLeasingNode<I>,
impl<D, I> MasterLeasingNode<(I,)> for D where
D: Decoration<Invocation = <<D as Decoration>::Decorated as Node>::Invocation, Communicator = <<D as Decoration>::Decorated as Node>::Communicator> + Node,
<D as Decoration>::Decorated: MasterLeasingNode<I>,
pub fn read_master_lax(
&Self
) -> Pin<Box<dyn Future<Output = Option<Arc<<<D as Node>::Invocation as Invocation>::State>>>, Global>>
pub fn read_master_strict(
&Self
) -> Pin<Box<dyn Future<Output = Option<Arc<<<D as Node>::Invocation as Invocation>::State>>>, Global>>
impl<D, I> MaybeLeadershipAwareNode<(I,)> for D where
D: 'static + Decoration<Invocation = <<D as Decoration>::Decorated as Node>::Invocation, Communicator = <<D as Decoration>::Decorated as Node>::Communicator> + Node,
<D as Decoration>::Decorated: MaybeLeadershipAwareNode<I>,
impl<D, I> MaybeLeadershipAwareNode<(I,)> for D where
D: 'static + Decoration<Invocation = <<D as Decoration>::Decorated as Node>::Invocation, Communicator = <<D as Decoration>::Decorated as Node>::Communicator> + Node,
<D as Decoration>::Decorated: MaybeLeadershipAwareNode<I>,
pub fn lax_leadership(
&Self
) -> Option<&[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]>
pub fn strict_leadership(
&Self
) -> Option<&[Leadership<<<<<D as Node>::Invocation as Invocation>::State as State>::Node as NodeInfo>::Id, <<D as Node>::Invocation as Invocation>::RoundNum, <<D as Node>::Invocation as Invocation>::CoordNum>]>
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more