Struct dataflow::source::timestamp::TimestampBindingUpdater[][src]

pub struct TimestampBindingUpdater {
    current_bindings_frontier: Antichain<Timestamp>,
    current_bindings: ChangeBatch<(SourceTimestamp, AssignedTimestamp)>,
}
Expand description

Helper that can track the timestamp bindings from a TimestampBindingRc and emit differential updates that can be used to reconstruct the timestamp bindings.

This can be used to tee off a “stream” of differential updates that can be used to maintain a copy of the current state of the bindings. For example, to persist them.

Fields

current_bindings_frontier: Antichain<Timestamp>

Current upper frontier of timestamp bindings, to avoid allocating a new Antichain on every invocation.

current_bindings: ChangeBatch<(SourceTimestamp, AssignedTimestamp)>

Consolidated view of the changes that we have emitted up to the latest invocation of update.

Implementations

Creates a new TimestampBindingUpdater. We need the initial_bindings to bootstrap the internal view with the current state of the bindings that the outside consumer of the updates has.

Note: You will usually not want to bootstrap this from a TimestampBindingsRc but instead from bindings that were restored from persistence. The reason is that the bindings in the TimestampBindingsRc can come from other sources and we must ensure that our internal view matches the state we have in persistence.

Brings the internal view of the bindings up to date with the bindings in the given timestamp_histories and returns any changes as differential updates.

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

Should always be Self

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more