#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct AdmissionWindow {
length: u64,
}
impl AdmissionWindow {
pub fn new(length: u64) -> Self {
Self { length }
}
pub fn length(self) -> u64 {
self.length
}
pub(super) fn cutoff(self, watermark: u64) -> u64 {
watermark.saturating_sub(self.length)
}
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct DeltaPoint<K, V> {
pub key: K,
pub end_time: u64,
pub value: V,
}
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct FinalizedBucket<K, V> {
pub key: K,
pub start: u64,
pub end: u64,
pub value: V,
}