Struct paxakos::leadership::ensure::EnsureLeadership [−][src]
pub struct EnsureLeadership<N, P> where
N: Node,
P: Fn() -> LogEntryOf<N> + 'static, { /* fields omitted */ }
Trait Implementations
impl<N: Debug, P: Debug> Debug for EnsureLeadership<N, P> where
N: Node,
P: Fn() -> LogEntryOf<N> + 'static,
impl<N: Debug, P: Debug> Debug for EnsureLeadership<N, P> where
N: Node,
P: Fn() -> LogEntryOf<N> + 'static,
impl<N, P> Decoration for EnsureLeadership<N, P> where
N: NodeImpl + 'static,
P: Fn() -> LogEntryOf<N> + 'static,
impl<N, P> Decoration for EnsureLeadership<N, P> where
N: NodeImpl + 'static,
P: Fn() -> LogEntryOf<N> + 'static,
type Arguments = EnsureLeadershipArgs<N, P>
type Arguments = EnsureLeadershipArgs<N, P>
Arguments this decoration requires. Read more
type Decorated = N
type Decorated = N
Type of the decorated node.
Wraps this decoration around the given node, using the given arguments.
impl<N, F> Node for EnsureLeadership<N, F> where
N: Node + 'static,
F: Fn() -> LogEntryOf<N> + 'static,
impl<N, F> Node for EnsureLeadership<N, F> where
N: Node + 'static,
F: Fn() -> LogEntryOf<N> + 'static,
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, F> NodeImpl for EnsureLeadership<N, F> where
N: NodeImpl + 'static,
F: Fn() -> LogEntryOf<N> + 'static,
impl<N, F> NodeImpl for EnsureLeadership<N, F> where
N: NodeImpl + 'static,
F: Fn() -> LogEntryOf<N> + 'static,
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, P> !RefUnwindSafe for EnsureLeadership<N, P>
impl<N, P> !Send for EnsureLeadership<N, P>
impl<N, P> !Sync for EnsureLeadership<N, P>
impl<N, P> Unpin for EnsureLeadership<N, P> where
N: Unpin,
P: Unpin,
impl<N, P> !UnwindSafe for EnsureLeadership<N, P>
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