Enum paxakos::event::Event [−][src]
#[non_exhaustive]
pub enum Event<I: Invocation> {
Init {
status: NodeStatus,
round: RoundNumOf<I>,
state: Option<Arc<StateOf<I>>>,
},
StatusChange {
old_status: NodeStatus,
new_status: NodeStatus,
},
Activate(RoundNumOf<I>),
Install {
round: RoundNumOf<I>,
state: Arc<StateOf<I>>,
},
Commit {
round: RoundNumOf<I>,
log_entry: Arc<LogEntryOf<I>>,
},
Apply {
round: RoundNumOf<I>,
log_entry: Arc<LogEntryOf<I>>,
result: EventOf<I>,
},
Gaps(Vec<Gap<RoundNumOf<I>>>),
Directive {
kind: DirectiveKind,
leader: NodeOf<I>,
round_num: RoundNumOf<I>,
coord_num: CoordNumOf<I>,
timestamp: Instant,
},
}
Expand description
Emitted by Node
’s poll_events
method.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Fields of Init
Fields of StatusChange
old_status: NodeStatus
new_status: NodeStatus
Activate(RoundNumOf<I>)
The node is transitioning to partially active participation.
Tuple Fields of Activate
0: RoundNumOf<I>
A snapshot was installed.
Fields of Install
round: RoundNumOf<I>
state: Arc<StateOf<I>>
An entry has been committed to the log.
The event does not imply that the entry was applied to the shared state.
Fields of Commit
round: RoundNumOf<I>
The round for which log_entry
was committed.
log_entry: Arc<LogEntryOf<I>>
The log entry which was committed.
The next log entry was applied to the state.
Fields of Apply
Gaps(Vec<Gap<RoundNumOf<I>>>)
A log entry was queued, preceeding entries are still missing.
Note: This event is emitted even when the queued entry is within the concurrency bound or if this node created the gap itself. The second case can arise when the leader tries to concurrently append multiple entries and abandons some of the earlier appends.
Tuple Fields of Gaps
0: Vec<Gap<RoundNumOf<I>>>
This node received a (potentially indirect) directive for the given round and from the given node. The node used the mandate obtained with the given coordination number to issue the directive.
This event is not emitted when this node is disoriented or lagging.
Fields of Directive
kind: DirectiveKind
leader: NodeOf<I>
round_num: RoundNumOf<I>
coord_num: CoordNumOf<I>
timestamp: Instant
Trait Implementations
Auto Trait Implementations
impl<I> RefUnwindSafe for Event<I> where
<I as Invocation>::CoordNum: RefUnwindSafe,
<<I as Invocation>::State as State>::Event: RefUnwindSafe,
<<I as Invocation>::State as State>::LogEntry: RefUnwindSafe,
<<I as Invocation>::State as State>::Node: RefUnwindSafe,
<I as Invocation>::RoundNum: RefUnwindSafe,
<I as Invocation>::State: RefUnwindSafe,
impl<I> Unpin for Event<I> where
<<I as Invocation>::State as State>::Event: Unpin,
<<I as Invocation>::State as State>::Node: Unpin,
impl<I> UnwindSafe for Event<I> where
<I as Invocation>::CoordNum: UnwindSafe,
<<I as Invocation>::State as State>::Event: UnwindSafe,
<<I as Invocation>::State as State>::LogEntry: RefUnwindSafe,
<<I as Invocation>::State as State>::Node: UnwindSafe,
<I as Invocation>::RoundNum: UnwindSafe,
<I as Invocation>::State: RefUnwindSafe,
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