pub struct NodeBuilderWithNodeIdAndCommunicator<I: Invocation, C: Communicator> { /* private fields */ }
Expand description
Node builder with node id and communicator already set.
Implementations
sourceimpl<I, C> NodeBuilderWithNodeIdAndCommunicator<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> NodeBuilderWithNodeIdAndCommunicator<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>>,
sourcepub fn with(
self,
starter: Starter<I>
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
pub fn with(
self,
starter: Starter<I>
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
Starts the node as specified by the given starter.
sourcepub fn without_state(
self
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
pub fn without_state(
self
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
Starts the node without any state and in passive mode.
sourcepub fn with_initial_state<S: Into<Option<FrozenStateOf<I>>>>(
self,
initial_state: S
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
pub fn with_initial_state<S: Into<Option<FrozenStateOf<I>>>>(
self,
initial_state: S
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
Starts a new cluster with the given initial state.
The round number will be zero.
sourcepub fn resuming_from<S: Into<SnapshotFor<I>>>(
self,
snapshot: S
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
pub fn resuming_from<S: Into<SnapshotFor<I>>>(
self,
snapshot: S
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
Resume operation from the given snapshot.
Soundness
It is assumed that the given snapshot was yielded from the Final
event of a clean shutdown and that the node hasn’t run in the meantime.
As such the node will start in active participation mode. This is
unsound if the assumptions are violated.
Use recovering_with to have a failed node recover.
sourcepub fn recovering_with<S: Into<Option<SnapshotFor<I>>>>(
self,
snapshot: S
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
pub fn recovering_with<S: Into<Option<SnapshotFor<I>>>>(
self,
snapshot: S
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
Resume operation from the given snapshot.
The node will participate passively until it can be certain that it is not breaking any previous commitments.
sourcepub fn recovering_without_state(
self
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
pub fn recovering_without_state(
self
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
Resume operation without a snapshot.
The node will participate passively until it can be certain that it is not breaking any previous commitments.
sourcepub fn joining_with<S: Into<Option<SnapshotFor<I>>>>(
self,
snapshot: S
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
pub fn joining_with<S: Into<Option<SnapshotFor<I>>>>(
self,
snapshot: S
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
Commence operation from the given snapshot.
Soundness
This method assumes that the node is (re-)joining the Paxos cluster. Use recovering_with to have a failed node recover.
A node is considered to rejoin iff there is a previous round r
such
that this node
- was not considered a member of the cluster for
r
and - it did not participate in any rounds since
r
.
sourcepub fn joining_without_state(
self
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
pub fn joining_without_state(
self
) -> NodeBuilder<Core<I, C>, impl Finisher<Node = Core<I, C>>>
Commence operation without a snapshot.
Soundness
This method assumes that the node is (re-)joining the Paxos cluster. Use recovering_with to have a failed node recover.
A node is considered to rejoin iff there is a previous round r
such
that this node
- was not considered a member of the cluster for
r
and - it did not participate in any rounds since
r
.