use super::*;
impl<State> Store<State> {
pub fn frontier(&self) -> FrontierView {
self.watermark_handle.lock().snapshot_view()
}
#[cfg(any(test, feature = "dangerous-test-hooks"))]
pub fn dangerous_watermark_snapshot(&self) -> WatermarkSnapshot {
self.watermark_handle.lock().snapshot()
}
#[cfg(any(test, feature = "dangerous-test-hooks"))]
pub fn dangerous_register_projection(&self, projection_id: &str) {
self.projection_registry.register(projection_id.to_owned());
}
#[cfg(any(test, feature = "dangerous-test-hooks"))]
pub fn dangerous_register_projection_for<T: 'static>(&self, entity: &str) {
self.projection_registry
.register(ProjectionRegistry::id_for_type::<T>(entity));
}
#[cfg(any(test, feature = "dangerous-test-hooks"))]
pub fn dangerous_notify_projection_applied(&self, projection_id: &str, point: HlcPoint) {
self.projection_registry
.notify_applied(projection_id.to_owned(), point);
}
#[cfg(any(test, feature = "dangerous-test-hooks"))]
pub fn dangerous_unregister_projection(&self, projection_id: &str) {
self.projection_registry.unregister(projection_id);
}
#[cfg(any(test, feature = "dangerous-test-hooks"))]
pub fn dangerous_notify_watermark_waiters(&self) {
self.watermark_handle.dangerous_notify_all();
}
}