pub struct LoggedUniformTotalOrderBroadcast<V: Clone + Ord> { /* private fields */ }Expand description
A totally ordered log whose sequence survives a restart.
Implementations§
Source§impl<V: Clone + Ord> LoggedUniformTotalOrderBroadcast<V>
impl<V: Clone + Ord> LoggedUniformTotalOrderBroadcast<V>
Sourcepub fn new(
me: NodeId,
peers: impl IntoIterator<Item = NodeId>,
timing: Timing,
) -> Self
pub fn new( me: NodeId, peers: impl IntoIterator<Item = NodeId>, timing: Timing, ) -> Self
A totally ordered log among peers whose sequence survives a restart.
Sourcepub fn entries(&self) -> &[OrderedSlot<V>] ⓘ
pub fn entries(&self) -> &[OrderedSlot<V>] ⓘ
The agreed sequence as this process holds it.
pub fn len(&self) -> usize
pub fn is_empty(&self) -> bool
pub fn round(&self) -> u64
pub fn instances(&self) -> usize
Trait Implementations§
Source§impl<V: Clone + Ord> Protocol for LoggedUniformTotalOrderBroadcast<V>
impl<V: Clone + Ord> Protocol for LoggedUniformTotalOrderBroadcast<V>
Source§fn on_recovery(&mut self, cx: &mut ProtoCx<'_, Self>)
fn on_recovery(&mut self, cx: &mut ProtoCx<'_, Self>)
upon event ⟨ Recovery ⟩, with the two facilities the page assumes discharged here: the
runtime that re-instantiates consensus instances, and the buffering behind such that.
Source§type Msg = Wire<<LoggedUniformReliableBroadcast<V> as Protocol>::Msg, Wire<BTreeSet<(NodeId, V)>>>
type Msg = Wire<<LoggedUniformReliableBroadcast<V> as Protocol>::Msg, Wire<BTreeSet<(NodeId, V)>>>
What crosses the wire to a peer running the same protocol.
Source§type Scope = Infallible
type Scope = Infallible
Scopes whose boundaries this protocol’s guarantees depend on, and which it can observe. Read more
Source§type Meta = Durable<V>
type Meta = Durable<V>
The durable value this protocol rewrites: a position, a count, an epoch. Small enough that
rewriting it costs nothing. Read more
Source§fn on_cmd(&mut self, cmd: Cmd<V>, cx: &mut ProtoCx<'_, Self>)
fn on_cmd(&mut self, cmd: Cmd<V>, cx: &mut ProtoCx<'_, Self>)
Handle a request from the layer above.
Source§fn on_msg(&mut self, from: NodeId, msg: Self::Msg, cx: &mut ProtoCx<'_, Self>)
fn on_msg(&mut self, from: NodeId, msg: Self::Msg, cx: &mut ProtoCx<'_, Self>)
Handle a message received from
from.Source§fn on_timer(&mut self, id: TimerId, cx: &mut ProtoCx<'_, Self>)
fn on_timer(&mut self, id: TimerId, cx: &mut ProtoCx<'_, Self>)
Handle a timer that fired somewhere in this protocol or in what it composes. Read more
Source§fn on_init(&mut self, cx: &mut ProtoCx<'_, Self>)
fn on_init(&mut self, cx: &mut ProtoCx<'_, Self>)
Begin, on a first start — when nothing has been written down. Read more
§fn on_scope_event(
&mut self,
_scope: Self::Scope,
_cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>,
)
fn on_scope_event( &mut self, _scope: Self::Scope, _cx: &mut Cx<'_, Self::Msg, Self::Ind, Self::Note, Self::Meta, Self::Entry>, )
Handle a boundary of a scope this protocol’s guarantees depend on — its end, or the
beginning of the one that succeeds it. Read more
Auto Trait Implementations§
impl<V> Freeze for LoggedUniformTotalOrderBroadcast<V>
impl<V> RefUnwindSafe for LoggedUniformTotalOrderBroadcast<V>where
V: RefUnwindSafe,
impl<V> Send for LoggedUniformTotalOrderBroadcast<V>where
V: Send,
impl<V> Sync for LoggedUniformTotalOrderBroadcast<V>where
V: Sync,
impl<V> Unpin for LoggedUniformTotalOrderBroadcast<V>where
V: Unpin,
impl<V> UnsafeUnpin for LoggedUniformTotalOrderBroadcast<V>
impl<V> UnwindSafe for LoggedUniformTotalOrderBroadcast<V>where
V: RefUnwindSafe + UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more