pub trait NodeImpl: Node {
fn append_impl<A, P, R>(
&mut self,
applicable: A,
args: P
) -> BoxFuture<'static, ImplAppendResultFor<Self, A, R>>
where
A: ApplicableTo<StateOf<Self>> + 'static,
P: Into<AppendArgs<Self::Invocation, R>>,
R: RetryPolicy<Invocation = Self::Invocation>;
fn await_commit_of(
&mut self,
log_entry_id: LogEntryIdOf<Self>
) -> BoxFuture<'static, Result<CommitFor<Self>, ShutDown>>;
fn eject(
&mut self,
reason: EjectionOf<Self>
) -> BoxFuture<'static, Result<bool, ShutDown>>;
fn poll(
&mut self,
round_num: RoundNumOf<Self>,
additional_nodes: Vec<NodeOf<Self>>
) -> BoxFuture<'static, Result<bool, PollError<Self::Invocation>>>;
}
Expand description
Exposes “plumbing” API relevant to decorations.
Required Methods
sourcefn append_impl<A, P, R>(
&mut self,
applicable: A,
args: P
) -> BoxFuture<'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>(
&mut self,
applicable: A,
args: P
) -> BoxFuture<'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.
sourcefn await_commit_of(
&mut self,
log_entry_id: LogEntryIdOf<Self>
) -> BoxFuture<'static, Result<CommitFor<Self>, ShutDown>>
fn await_commit_of(
&mut self,
log_entry_id: LogEntryIdOf<Self>
) -> BoxFuture<'static, Result<CommitFor<Self>, ShutDown>>
Wait for the log entry with the given ID to be committed.
sourcefn eject(
&mut self,
reason: EjectionOf<Self>
) -> BoxFuture<'static, Result<bool, ShutDown>>
fn eject(
&mut self,
reason: EjectionOf<Self>
) -> BoxFuture<'static, Result<bool, ShutDown>>
Eject the node’s state.
Returns true
if state was ejected, false
if the node didn’t have
state to begin with.
sourcefn poll(
&mut self,
round_num: RoundNumOf<Self>,
additional_nodes: Vec<NodeOf<Self>>
) -> BoxFuture<'static, Result<bool, PollError<Self::Invocation>>>
fn poll(
&mut self,
round_num: RoundNumOf<Self>,
additional_nodes: Vec<NodeOf<Self>>
) -> BoxFuture<'static, Result<bool, PollError<Self::Invocation>>>
Polls the given nodes for the log entry to apply to the given round.
Returns whether a log entry could be polled or not.