[−][src]Trait paxakos::Node
Associated Types
type State: State<LogEntry = <Self::Communicator as Communicator>::LogEntry, Node = <Self::Communicator as Communicator>::Node>
type Communicator: Communicator
type Shutdown: Shutdown
Required methods
fn status(&self) -> NodeStatus
fn poll_events(
&mut self,
cx: &mut Context
) -> Poll<Event<Self::State, RoundNumOf<Self::Communicator>>>
&mut self,
cx: &mut Context
) -> Poll<Event<Self::State, RoundNumOf<Self::Communicator>>>
Polls the node's event stream.
It is important to poll the node's event stream because it implicitly drives the actions that keep the node up to date.
fn handle(
&self
) -> NodeHandle<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
&self
) -> NodeHandle<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
fn prepare_snapshot(
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
fn affirm_snapshot(
&self,
snapshot: Snapshot<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
&self,
snapshot: Snapshot<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
fn install_snapshot(
&self,
snapshot: Snapshot<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
&self,
snapshot: Snapshot<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
fn read_stale(&self) -> LocalBoxFuture<'static, Result<Arc<Self::State>, ()>>
fn append(
&self,
log_entry: impl Into<Arc<LogEntryOf<Self::State>>>,
args: AppendArgs<RoundNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<Commit<Self::State>, AppendError>>
&self,
log_entry: impl Into<Arc<LogEntryOf<Self::State>>>,
args: AppendArgs<RoundNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<Commit<Self::State>, AppendError>>
fn shut_down(self) -> Self::Shutdown
Implementors
impl<N, F> Node for AutoFillGaps<N, F> where
N: Node,
F: 'static + Fn() -> LogEntryOf<StateOf<N>>,
[src]
N: Node,
F: 'static + Fn() -> LogEntryOf<StateOf<N>>,
type State = StateOf<N>
type Communicator = CommunicatorOf<N>
type Shutdown = <N as Node>::Shutdown
fn status(&self) -> NodeStatus
[src]
fn poll_events(
&mut self,
cx: &mut Context
) -> Poll<Event<Self::State, RoundNumOf<Self::Communicator>>>
[src]
&mut self,
cx: &mut Context
) -> Poll<Event<Self::State, RoundNumOf<Self::Communicator>>>
fn handle(
&self
) -> NodeHandle<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
[src]
&self
) -> NodeHandle<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
fn prepare_snapshot(
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
[src]
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
fn affirm_snapshot(
&self,
snapshot: Snapshot<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
[src]
&self,
snapshot: Snapshot<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
fn install_snapshot(
&self,
snapshot: Snapshot<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
[src]
&self,
snapshot: Snapshot<Self::State, RoundNumOf<Self::Communicator>, CoordNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
fn read_stale(&self) -> LocalBoxFuture<'static, Result<Arc<Self::State>, ()>>
[src]
fn append(
&self,
log_entry: impl Into<Arc<LogEntryOf<Self::State>>>,
args: AppendArgs<RoundNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<Commit<Self::State>, AppendError>>
[src]
&self,
log_entry: impl Into<Arc<LogEntryOf<Self::State>>>,
args: AppendArgs<RoundNumOf<Self::Communicator>>
) -> LocalBoxFuture<'static, Result<Commit<Self::State>, AppendError>>
fn shut_down(self) -> Self::Shutdown
[src]
impl<S, C> Node for NodeKernel<S, C> where
S: State<LogEntry = <C as Communicator>::LogEntry, Node = <C as Communicator>::Node>,
C: Communicator,
[src]
S: State<LogEntry = <C as Communicator>::LogEntry, Node = <C as Communicator>::Node>,
C: Communicator,
type State = S
type Communicator = C
type Shutdown = DefaultShutdown<S, C>
fn status(&self) -> NodeStatus
[src]
fn poll_events(&mut self, cx: &mut Context) -> Poll<Event<S, RoundNumOf<C>>>
[src]
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.
fn handle(&self) -> NodeHandle<S, RoundNumOf<C>, CoordNumOf<C>>
[src]
fn prepare_snapshot(
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
[src]
&self
) -> LocalBoxFuture<'static, Result<SnapshotFor<Self>, PrepareSnapshotError>>
fn affirm_snapshot(
&self,
snapshot: Snapshot<S, RoundNumOf<C>, CoordNumOf<C>>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
[src]
&self,
snapshot: Snapshot<S, RoundNumOf<C>, CoordNumOf<C>>
) -> LocalBoxFuture<'static, Result<(), AffirmSnapshotError>>
fn install_snapshot(
&self,
snapshot: Snapshot<S, RoundNumOf<C>, CoordNumOf<C>>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
[src]
&self,
snapshot: Snapshot<S, RoundNumOf<C>, CoordNumOf<C>>
) -> LocalBoxFuture<'static, Result<(), InstallSnapshotError>>
fn append(
&self,
log_entry: impl Into<Arc<LogEntryOf<S>>>,
args: AppendArgs<RoundNumOf<C>>
) -> LocalBoxFuture<'static, Result<Commit<S>, AppendError>>
[src]
&self,
log_entry: impl Into<Arc<LogEntryOf<S>>>,
args: AppendArgs<RoundNumOf<C>>
) -> LocalBoxFuture<'static, Result<Commit<S>, AppendError>>