arcon_backend/lib.rs
1#[cfg(test)]
2extern crate tempfile;
3
4pub mod in_memory;
5#[cfg(feature = "rocksdb")]
6pub mod rocksdb;
7
8use arcon_error::ArconResult;
9
10/// Trait required for all state backend implementations in Arcon
11pub trait StateBackend: Send + Sync {
12 fn create(name: &str) -> Self
13 where
14 Self: Sized;
15 fn put(&mut self, key: &[u8], value: &[u8]) -> ArconResult<()>;
16 fn get(&self, key: &[u8]) -> ArconResult<Vec<u8>>;
17 fn checkpoint(&self, id: String) -> ArconResult<()>;
18}