Struct mz_stash::StashCollection
source · pub struct StashCollection<K, V> {
pub id: Id,
pub(crate) _kv: PhantomData<(K, V)>,
}
Expand description
StashCollection
is like a differential dataflow Collection
, but the
state of the collection is durable.
A StashCollection
stores (key, value, timestamp, diff)
entries. The key
and value types are chosen by the caller; they must implement Ord
and
they must be serializable to and deserializable via serde. The timestamp and
diff types are fixed to i64
.
A StashCollection
maintains a since frontier and an upper frontier, as
described in the correctness vocabulary document. To advance the since
frontier, call compact
. To advance the upper frontier, call seal
. To
physically compact data beneath the since frontier, call consolidate
.
Fields§
§id: Id
§_kv: PhantomData<(K, V)>
Implementations§
source§impl<K, V> StashCollection<K, V>
impl<K, V> StashCollection<K, V>
sourcepub async fn make_batch(
&self,
stash: &mut Stash
) -> Result<AppendBatch, StashError>
pub async fn make_batch( &self, stash: &mut Stash ) -> Result<AppendBatch, StashError>
Create a new AppendBatch for this collection from its current upper.
sourcepub async fn make_batch_tx(
&self,
tx: &Transaction<'_>
) -> Result<AppendBatch, StashError>
pub async fn make_batch_tx( &self, tx: &Transaction<'_> ) -> Result<AppendBatch, StashError>
Create a new AppendBatch for this collection from its current upper.
sourcepub fn make_batch_lower(
&self,
lower: Antichain<Timestamp>
) -> Result<AppendBatch, StashError>
pub fn make_batch_lower( &self, lower: Antichain<Timestamp> ) -> Result<AppendBatch, StashError>
Create a new AppendBatch for this collection from its current upper.
source§impl<K, V> StashCollection<K, V>where
K: Data,
V: Data,
impl<K, V> StashCollection<K, V>where K: Data, V: Data,
pub fn append_to_batch( &self, batch: &mut AppendBatch, key: &K, value: &V, diff: Diff )
Trait Implementations§
source§impl<K, V> Clone for StashCollection<K, V>
impl<K, V> Clone for StashCollection<K, V>
source§impl<K, V> From<i64> for StashCollection<K, V>
impl<K, V> From<i64> for StashCollection<K, V>
impl<K, V> Copy for StashCollection<K, V>
Auto Trait Implementations§
impl<K, V> RefUnwindSafe for StashCollection<K, V>where K: RefUnwindSafe, V: RefUnwindSafe,
impl<K, V> Send for StashCollection<K, V>where K: Send, V: Send,
impl<K, V> Sync for StashCollection<K, V>where K: Sync, V: Sync,
impl<K, V> Unpin for StashCollection<K, V>where K: Unpin, V: Unpin,
impl<K, V> UnwindSafe for StashCollection<K, V>where K: UnwindSafe, V: UnwindSafe,
Blanket Implementations§
source§impl<T> FutureExt for T
impl<T> FutureExt for T
source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
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>
T
in a tonic::Request
source§impl<P, R> ProtoType<R> for Pwhere
R: RustType<P>,
impl<P, R> ProtoType<R> for Pwhere R: RustType<P>,
source§fn into_rust(self) -> Result<R, TryFromProtoError>
fn into_rust(self) -> Result<R, TryFromProtoError>
RustType::from_proto
.source§fn from_rust(rust: &R) -> P
fn from_rust(rust: &R) -> P
RustType::into_proto
.