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.
fn last_committed_timestamp(&self) -> Timestamp
fn last_committed_timestamp(&self) -> 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.