Enum int_compute::Event
[−]
[src]
pub enum Event { FlowStarted(FlowTags), FlowTerminated(FlowTags), FlowUpdated { flow: FlowTags, columns: HashSet<Ident>, }, CorkRequest(Cork), }
Some event the internal computation might want to react to.
All the variants that are caused by a concrete flow carry the FlowTags
handle. It can be both
used to examine the flow (it contains the current headers of the flow) and to reference the
flow in a newly created update.
Variants
FlowStarted(FlowTags)
A flow has started.
FlowTerminated(FlowTags)
A flow has been dropped.
This isn't the same as the flow being closed. This is triggered when the flow is destroyed in the in-memory representation. Therefore, generating new updates for this flow is useless (there will be no flow to apply them to) and the purpose is mainly to trigger clearing of computations' internal caches.
FlowUpdated
Something changed on a flow.
Fields of FlowUpdated
flow: FlowTags | Handle to the changed flow. |
columns: HashSet<Ident> | Identities of the columns that changed. This contains both the newly added columns and columns with updated values. Note that the value might have been replaced by the same value. |
CorkRequest(Cork)
There's a request to cork (flush) previous updates.
If the computation produced any updates since the last CorkRequest
, a clone of the
provided Cork
must be pushed through the sender channel. This ensures all the updates are
applied before the corresponding time slice is closed.
It is recommended to simply push the clone into the stream every time the event comes, without keeping track if any updates happened.