Struct paxakos::node::Core [−][src]
pub struct Core<I, C> where
I: Invocation,
C: Communicator<Node = NodeOf<I>, RoundNum = RoundNumOf<I>, CoordNum = CoordNumOf<I>, LogEntry = LogEntryOf<I>, Error = CommunicationErrorOf<I>, Yea = YeaOf<I>, Nay = NayOf<I>, Abstain = AbstainOf<I>>, { /* fields omitted */ }
Expand description
Trait Implementations
impl<I, C> MaybeLeadershipAwareNode<()> for Core<I, C> where
I: Invocation,
C: Communicator<Node = NodeOf<I>, RoundNum = RoundNumOf<I>, CoordNum = CoordNumOf<I>, LogEntry = LogEntryOf<I>, Error = CommunicationErrorOf<I>, Yea = YeaOf<I>, Nay = NayOf<I>, Abstain = AbstainOf<I>>,
impl<I, C> MaybeLeadershipAwareNode<()> for Core<I, C> where
I: Invocation,
C: Communicator<Node = NodeOf<I>, RoundNum = RoundNumOf<I>, CoordNum = CoordNumOf<I>, LogEntry = LogEntryOf<I>, Error = CommunicationErrorOf<I>, Yea = YeaOf<I>, Nay = NayOf<I>, Abstain = AbstainOf<I>>,
impl<I, C> Node for Core<I, C> where
I: Invocation,
C: Communicator<Node = NodeOf<I>, RoundNum = RoundNumOf<I>, CoordNum = CoordNumOf<I>, LogEntry = LogEntryOf<I>, Error = CommunicationErrorOf<I>, Yea = YeaOf<I>, Nay = NayOf<I>, Abstain = AbstainOf<I>>,
impl<I, C> Node for Core<I, C> where
I: Invocation,
C: Communicator<Node = NodeOf<I>, RoundNum = RoundNumOf<I>, CoordNum = CoordNumOf<I>, LogEntry = LogEntryOf<I>, Error = CommunicationErrorOf<I>, Yea = YeaOf<I>, Nay = NayOf<I>, Abstain = AbstainOf<I>>,
Polls the node’s status, yielding Ready
on every change.
It is important to poll the node’s event stream because it implicitly drives the actions that keep the node up to date.
type Invocation = I
type Invocation = I
Parametrization of the paxakos algorithm.
type Communicator = C
type Communicator = C
Type of communicator this node uses.
type Shutdown = DefaultShutdown<I>
type Shutdown = DefaultShutdown<I>
Type that will perform graceful shutdown if requsted.
Node’s current status.
Node’s current mode of participation.
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.
fn append<A, P, R>(
&self,
applicable: A,
args: P
) -> LocalBoxFuture<'_, AppendResultFor<Self, A, R>> where
A: ApplicableTo<StateOf<Self::Invocation>> + '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::Invocation>> + '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::Invocation>> + '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::Invocation>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>,
R::StaticError: From<ShutDownOr<R::Error>>,
Appends applicable
to the shared log.
Reads the node’s current state. Read more
impl<I, C> NodeImpl for Core<I, C> where
I: Invocation,
C: Communicator<Node = NodeOf<I>, RoundNum = RoundNumOf<I>, CoordNum = CoordNumOf<I>, LogEntry = LogEntryOf<I>, Error = CommunicationErrorOf<I>, Yea = YeaOf<I>, Nay = NayOf<I>, Abstain = AbstainOf<I>>,
impl<I, C> NodeImpl for Core<I, C> where
I: Invocation,
C: Communicator<Node = NodeOf<I>, RoundNum = RoundNumOf<I>, CoordNum = CoordNumOf<I>, LogEntry = LogEntryOf<I>, Error = CommunicationErrorOf<I>, Yea = YeaOf<I>, Nay = NayOf<I>, Abstain = AbstainOf<I>>,
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<I, C> !RefUnwindSafe for Core<I, C>
impl<I, C> !UnwindSafe for Core<I, C>
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
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