pub struct SimulatedAuthorityStore<A = StreamAuthorityStore<MemoryStream>> { /* private fields */ }Expand description
Authority backend handle controlled by one Simulation.
Trait Implementations§
Source§impl<A: AsyncAuthorityStore> AsyncAuthorityStore for SimulatedAuthorityStore<A>
impl<A: AsyncAuthorityStore> AsyncAuthorityStore for SimulatedAuthorityStore<A>
Creates a destination authority whose canonical generation lineage is
either an immutable native prefix of the source or an explicit
independent lineage rooted at an unpublished authenticated generation.
Asynchronously creates one authority.
Source§async fn head(
&self,
authority_id: AuthorityId,
budget: WorkBudget,
cancellation: &CancellationToken,
) -> AuthorityResult<Head>
async fn head( &self, authority_id: AuthorityId, budget: WorkBudget, cancellation: &CancellationToken, ) -> AuthorityResult<Head>
Asynchronously reads the linearizable head.
Source§async fn compare_and_append(
&self,
authority_id: AuthorityId,
epoch: Epoch,
expected: Head,
commit: ProposedCommit,
budget: WorkBudget,
cancellation: &CancellationToken,
) -> AuthorityResult<AppendOutcome>
async fn compare_and_append( &self, authority_id: AuthorityId, epoch: Epoch, expected: Head, commit: ProposedCommit, budget: WorkBudget, cancellation: &CancellationToken, ) -> AuthorityResult<AppendOutcome>
Asynchronously compares and appends one durable operation.
Source§async fn replay(
&self,
authority_id: AuthorityId,
after: Sequence,
limit: ReplayLimit,
budget: WorkBudget,
cancellation: &CancellationToken,
) -> AuthorityResult<Vec<DurableCommit>>
async fn replay( &self, authority_id: AuthorityId, after: Sequence, limit: ReplayLimit, budget: WorkBudget, cancellation: &CancellationToken, ) -> AuthorityResult<Vec<DurableCommit>>
Asynchronously replays one bounded contiguous page.
Source§async fn fence(
&self,
authority_id: AuthorityId,
expected: Head,
budget: WorkBudget,
cancellation: &CancellationToken,
) -> AuthorityResult<FenceOutcome>
async fn fence( &self, authority_id: AuthorityId, expected: Head, budget: WorkBudget, cancellation: &CancellationToken, ) -> AuthorityResult<FenceOutcome>
Asynchronously advances a writer fence.
Source§async fn find_operation(
&self,
authority_id: AuthorityId,
operation_id: OperationId,
budget: WorkBudget,
cancellation: &CancellationToken,
) -> AuthorityResult<Option<DurableCommit>>
async fn find_operation( &self, authority_id: AuthorityId, operation_id: OperationId, budget: WorkBudget, cancellation: &CancellationToken, ) -> AuthorityResult<Option<DurableCommit>>
Asynchronously resolves one idempotent operation identity.
Source§fn supports_generation_lineage_prefix(&self) -> bool
fn supports_generation_lineage_prefix(&self) -> bool
Whether this backend can retain an immutable published-generation
lineage prefix when it creates a child authority.
Source§fn compare_and_append_guarded(
&self,
request: GuardedAppend,
budget: WorkBudget,
cancellation: &CancellationToken,
) -> impl Future<Output = AuthorityResult<AppendOutcome>> + StorageFuture
fn compare_and_append_guarded( &self, request: GuardedAppend, budget: WorkBudget, cancellation: &CancellationToken, ) -> impl Future<Output = AuthorityResult<AppendOutcome>> + StorageFuture
Asynchronously compares and appends under an optional operation-window
permit. Backends that cannot atomically evaluate lease gates reject
managed permits rather than using a read-then-write approximation.
Source§fn reserve_publication(
&self,
_authority_id: AuthorityId,
_expected: Head,
_operation_id: OperationId,
_budget: WorkBudget,
_cancellation: &CancellationToken,
) -> impl Future<Output = AuthorityResult<ReservationOutcome>> + StorageFuture
fn reserve_publication( &self, _authority_id: AuthorityId, _expected: Head, _operation_id: OperationId, _budget: WorkBudget, _cancellation: &CancellationToken, ) -> impl Future<Output = AuthorityResult<ReservationOutcome>> + StorageFuture
Atomically acquires the exclusive publication gate at an exact head.
Source§fn release_publication(
&self,
_reservation: PublicationReservation,
_budget: WorkBudget,
_cancellation: &CancellationToken,
) -> impl Future<Output = AuthorityResult<()>> + StorageFuture
fn release_publication( &self, _reservation: PublicationReservation, _budget: WorkBudget, _cancellation: &CancellationToken, ) -> impl Future<Output = AuthorityResult<()>> + StorageFuture
Releases an exact publication reservation. Exact retries are idempotent.
Auto Trait Implementations§
impl<A> Freeze for SimulatedAuthorityStore<A>
impl<A> RefUnwindSafe for SimulatedAuthorityStore<A>where
Arc<A>: RefUnwindSafe,
impl<A> Send for SimulatedAuthorityStore<A>
impl<A> Sync for SimulatedAuthorityStore<A>
impl<A> Unpin for SimulatedAuthorityStore<A>
impl<A> UnsafeUnpin for SimulatedAuthorityStore<A>where
Arc<A>: UnsafeUnpin,
impl<A> UnwindSafe for SimulatedAuthorityStore<A>where
Arc<A>: 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request