Rindle docs and package mapSkip to main content

ProgressTracker

Struct ProgressTracker 

Source
pub struct ProgressTracker { /* private fields */ }
Expand description

See the module docs. Single-thread (Db) semantics; one instance per server.

Implementations§

Source§

impl ProgressTracker

Source

pub fn new(initial_cv: u64) -> ProgressTracker

Open at the replica’s current committed watermark (Db::committed_tx_id).

Source

pub fn connect(&mut self, conn: u64)

Register a connection under the caller’s opaque id.

Source

pub fn disconnect(&mut self, conn: u64)

Drop a connection and its query registrations.

Source

pub fn add_query(&mut self, conn: u64, query: QueryId, hydrated_cv: u64)

Register a live query on conn, known-current as of its hydrate watermark.

Source

pub fn remove_query(&mut self, conn: u64, query: QueryId)

Deregister a query (unsubscribed / destroyed) so it no longer pins cv_min.

Source

pub fn note_commit( &mut self, cv: u64, changed: &[QueryId], ) -> Vec<(u64, ProgressFrame)>

Fold one committed transaction in: cv (the commit’s TxId) and the queries whose results changed (the subscriptions that fired — a client’s own lmid advance fires its system query, so it is in here like any data change). Advances every query’s known-current cv (single-thread semantics — see module docs) and returns the poke set: (conn, frame) for exactly the connections the poke rule selects, in connection-id order.

Source

pub fn cv_min(&self, conn: u64) -> Option<u64>

The commit version every one of conn’s live queries has processed through (the frame’s cv_min); the frontier for a query-less connection.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,