pub trait PaxosLike<'a>: Sized {
type PaxosIn: 'a;
type PaxosLog: 'a;
type PaxosOut: 'a;
type Ballot: Clone + Ord + Debug + Serialize + DeserializeOwned;
// Required methods
fn payload_recipients(&self) -> &Cluster<'a, Self::PaxosIn>;
fn log_stores(&self) -> &Cluster<'a, Self::PaxosLog>;
fn get_recipient_from_ballot<L: Location<'a>>(
ballot: Optional<Self::Ballot, L, Unbounded>,
) -> Optional<MemberId<Self::PaxosIn>, L, Unbounded>;
fn build<P: PaxosPayload>(
self,
payload_generator: impl FnOnce(Stream<Self::Ballot, Cluster<'a, Self::PaxosIn>, Unbounded>) -> Stream<P, Cluster<'a, Self::PaxosIn>, Unbounded>,
checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
nondet_leader: NonDet,
nondet_commit: NonDet,
) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>;
// Provided method
fn with_client<C: 'a, P: PaxosPayload>(
self,
clients: &Cluster<'a, C>,
payloads: Stream<P, Cluster<'a, C>, Unbounded>,
checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
nondet_commit: NonDet,
nondet_order: NonDet,
) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder> { ... }
}
Required Associated Types§
Sourcetype PaxosOut: 'a
type PaxosOut: 'a
The nodes that output the results of Paxos. Proposers in Paxos, Proxy leaders in Compartmentalized Paxos.
type Ballot: Clone + Ord + Debug + Serialize + DeserializeOwned
Required Methods§
fn payload_recipients(&self) -> &Cluster<'a, Self::PaxosIn>
fn log_stores(&self) -> &Cluster<'a, Self::PaxosLog>
fn get_recipient_from_ballot<L: Location<'a>>( ballot: Optional<Self::Ballot, L, Unbounded>, ) -> Optional<MemberId<Self::PaxosIn>, L, Unbounded>
Sourcefn build<P: PaxosPayload>(
self,
payload_generator: impl FnOnce(Stream<Self::Ballot, Cluster<'a, Self::PaxosIn>, Unbounded>) -> Stream<P, Cluster<'a, Self::PaxosIn>, Unbounded>,
checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
nondet_leader: NonDet,
nondet_commit: NonDet,
) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>
fn build<P: PaxosPayload>( self, payload_generator: impl FnOnce(Stream<Self::Ballot, Cluster<'a, Self::PaxosIn>, Unbounded>) -> Stream<P, Cluster<'a, Self::PaxosIn>, Unbounded>, checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>, nondet_leader: NonDet, nondet_commit: NonDet, ) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>
§Non-Determinism
During leader-reelection, the latest known leader may be stale, which may result in non-deterministic dropping of payloads.
Provided Methods§
Sourcefn with_client<C: 'a, P: PaxosPayload>(
self,
clients: &Cluster<'a, C>,
payloads: Stream<P, Cluster<'a, C>, Unbounded>,
checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>,
nondet_commit: NonDet,
nondet_order: NonDet,
) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>
fn with_client<C: 'a, P: PaxosPayload>( self, clients: &Cluster<'a, C>, payloads: Stream<P, Cluster<'a, C>, Unbounded>, checkpoints: Optional<usize, Cluster<'a, Self::PaxosLog>, Unbounded>, nondet_commit: NonDet, nondet_order: NonDet, ) -> Stream<(usize, Option<P>), Cluster<'a, Self::PaxosOut>, Unbounded, NoOrder>
§Non-Determinism
During leader-reelection, the latest known leader may be stale, which may result in non-deterministic dropping of payloads. Also, payloads across clients will be arbitrarily interleaved as they arrive at the leader.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.