arcon_backend 0.1.1

State Backends for Arcon
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#[cfg(test)]
extern crate tempfile;

pub mod in_memory;
#[cfg(feature = "rocksdb")]
pub mod rocksdb;

use arcon_error::ArconResult;

/// Trait required for all state backend implementations in Arcon
pub trait StateBackend: Send + Sync {
    fn create(name: &str) -> Self
    where
        Self: Sized;
    fn put(&mut self, key: &[u8], value: &[u8]) -> ArconResult<()>;
    fn get(&self, key: &[u8]) -> ArconResult<Vec<u8>>;
    fn checkpoint(&self, id: String) -> ArconResult<()>;
}