Struct dataflow::source::timestamp::TimestampProposer [−][src]
pub struct TimestampProposer {
bindings: HashMap<PartitionId, MzOffset>,
timestamp: Timestamp,
last_update_time: Instant,
update_interval: u64,
now: NowFn,
}
Expand description
This struct holds state for proposed timestamps and proposed bindings from offsets to timestamps.
Fields
bindings: HashMap<PartitionId, MzOffset>
Working set of proposed offsets to assign to a new timestamp.
timestamp: Timestamp
Current timestamp we are assigning new data to.
last_update_time: Instant
Last time we updated the timestamp.
update_interval: u64
Interval at which we are updating the timestamp.
now: NowFn
Implementations
Attempt to propose that (partition, offset)
be bound to time
, which means
that all offsets < offset
get bound to time
for partition
.
This proposal will be ignored if the time
does not match the current time
this proposer is operating at, and also if another reader has already proposed
a binding for an offset greater than offset
. The only exception here is if
time
is 0, which is accepted to bootstrap the timestamp proposal.
Attempt to mint the currently proposed timestamp bindings, and open up for proposals on a new timestamp.
This function needs to be called periodically in order for RT sources to make progress.
Trait Implementations
Auto Trait Implementations
impl !RefUnwindSafe for TimestampProposer
impl Send for TimestampProposer
impl Sync for TimestampProposer
impl Unpin for TimestampProposer
impl !UnwindSafe for TimestampProposer
Blanket Implementations
Mutably borrows from an owned value. Read more
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