[−][src]Struct actyxos_data_flow::flow::Input
An input to a Flow
An Input
is the entry point by which data records enter a Flow
.
Both of these are created together by the Flow::new
method.
Implementations
impl<T: ExchangeData> Input<T>
[src]
pub fn advance_to(&mut self, time: usize)
[src]
Advance the input timestamp to the given value
This is usually done after ingesting a batch of data, followed by a .flush()
to send the ingested collection elements through the flow and have them generate their
deltas.
pub fn flush(&mut self)
[src]
Flush this input’s inserted elements into the collection
The worker executing this flow can then be stepped until the resulting deltas reach their designated outputs.
pub fn insert(&mut self, value: T)
[src]
Insert a new element into the collection
pub fn remove(&mut self, value: T)
[src]
Remove an element from the collection
pub fn look_back(&self) -> Option<Duration>
[src]
Query this input’s desired look back interval
In general, correct function of a flow requires that all data are inserted so that all desired outputs are computed. When restarting this process, ingesting all data from the beginning can be quite time-consuming. It is not uncommon that the logic expressed by the flow does not care about elements of arbitrary age to correctly compute deltas for new (current) elements.
For example, in a factory each production order is only relevant for a few days or weeks, matching the timespan needed to fulfil that order. Or an operations dashboard may focus on the behavior of the system over the past 24 hours and thus inputs from one week ago have no influence anymore on what shall be on the screens.
In these cases, limited look back is a suitable performance optimization to speed up system
restarts. When full precision is paramount, this shall be set to None
to always recompute
the full state of the flow after a restart.
This parameter can be set by using Flow::new_limited
.
Trait Implementations
impl<T: ExchangeData + DeserializeOwned> Inputs for Input<Event<T>>
[src]
Auto Trait Implementations
impl<T> !RefUnwindSafe for Input<T>
impl<T> !Send for Input<T>
impl<T> !Sync for Input<T>
impl<T> Unpin for Input<T> where
T: Unpin,
T: Unpin,
impl<T> !UnwindSafe for Input<T>
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<Src, Dst> LosslessTryInto<Dst> for Src where
Dst: LosslessTryFrom<Src>,
[src]
Dst: LosslessTryFrom<Src>,
fn lossless_try_into(self) -> Option<Dst>
[src]
impl<Src, Dst> LossyInto<Dst> for Src where
Dst: LossyFrom<Src>,
[src]
Dst: LossyFrom<Src>,
fn lossy_into(self) -> Dst
[src]
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
V: MultiLane<T>,