logo
pub trait State: 'static + Send + Sync {
    type Item: Default;
    fn commit(&mut self, timestamp: &Timestamp);
    fn last_committed_timestamp(&self) -> Timestamp;
    fn at(&mut self, timestamp: &Timestamp) -> Option<&mut Self::Item>;
}
Expand description

The State trait must be implemented by the state exposed to the operators by ERDOS.

Associated Types

Required methods

The commit method commits the final state for a given timestamp.

Retrieves the last committed timestamp by this state. This method can be used in conjunction with Self::at to retrieve the latest committed state.

Retrieve the state at a given timestamp. If the state for that timestamp hasn’t been initialized yet, invoke the default method on the Self::Item type, and return the newly created state for that timestamp.

Implementations on Foreign Types

State implementation for () to be used by operators that are stateless.

Implementors