Struct paxakos::leases::releaser::Releaser [−][src]
pub struct Releaser<N, P> where
N: Node,
EventOf<N>: AsLeaseEvent,
P: Fn(<<EventOf<N> as AsLeaseEvent>::Lease as Lease>::Id) -> LogEntryOf<N>, { /* fields omitted */ }
Trait Implementations
impl<N, P> Decoration for Releaser<N, P> where
N: NodeImpl + 'static,
EventOf<N>: AsLeaseEvent,
P: Fn(<<EventOf<N> as AsLeaseEvent>::Lease as Lease>::Id) -> LogEntryOf<N> + 'static,
impl<N, P> Decoration for Releaser<N, P> where
N: NodeImpl + 'static,
EventOf<N>: AsLeaseEvent,
P: Fn(<<EventOf<N> as AsLeaseEvent>::Lease as Lease>::Id) -> LogEntryOf<N> + 'static,
type Arguments = ReleaserArgs<N, P>
type Arguments = ReleaserArgs<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, C> Node for Releaser<N, C> where
N: Node,
EventOf<N>: AsLeaseEvent,
C: Fn(<<EventOf<N> as AsLeaseEvent>::Lease as Lease>::Id) -> LogEntryOf<N>,
impl<N, C> Node for Releaser<N, C> where
N: Node,
EventOf<N>: AsLeaseEvent,
C: Fn(<<EventOf<N> as AsLeaseEvent>::Lease as Lease>::Id) -> LogEntryOf<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> NodeImpl for Releaser<N, C> where
N: NodeImpl,
EventOf<N>: AsLeaseEvent,
C: Fn(<<EventOf<N> as AsLeaseEvent>::Lease as Lease>::Id) -> LogEntryOf<N>,
impl<N, C> NodeImpl for Releaser<N, C> where
N: NodeImpl,
EventOf<N>: AsLeaseEvent,
C: Fn(<<EventOf<N> as AsLeaseEvent>::Lease as Lease>::Id) -> LogEntryOf<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, P> !RefUnwindSafe for Releaser<N, P>
impl<N, P> Unpin for Releaser<N, P> where
N: Unpin,
P: Unpin,
<<<<<N as Node>::Invocation as Invocation>::State as State>::Effect as AsLeaseEvent>::Lease as Lease>::Id: Unpin,
impl<N, P> !UnwindSafe for Releaser<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