pub struct TieredStorage {
hot: InMemoryStore,
warm: WarmStore,
}Expand description
Composite storage that reads from hot first, then warm.
Fields§
§hot: InMemoryStoreHot tier (fast, in-memory or RocksDB).
warm: WarmStoreWarm tier (file-based, partitioned).
Implementations§
Source§impl TieredStorage
impl TieredStorage
Sourcepub fn new(hot: InMemoryStore, warm: WarmStore) -> Self
pub fn new(hot: InMemoryStore, warm: WarmStore) -> Self
Create a new tiered storage with the given hot and warm stores.
Sourcepub fn hot(&self) -> &InMemoryStore
pub fn hot(&self) -> &InMemoryStore
Access the hot tier directly.
Trait Implementations§
Source§impl StorageBackend for TieredStorage
impl StorageBackend for TieredStorage
Source§fn get(
&self,
entity_id: u64,
space_id: u32,
timestamp: i64,
) -> Result<Option<TemporalPoint>, StorageError>
fn get( &self, entity_id: u64, space_id: u32, timestamp: i64, ) -> Result<Option<TemporalPoint>, StorageError>
Retrieve a single point by entity, space, and timestamp.
Source§fn put(&self, space_id: u32, point: &TemporalPoint) -> Result<(), StorageError>
fn put(&self, space_id: u32, point: &TemporalPoint) -> Result<(), StorageError>
Store a temporal point.
Auto Trait Implementations§
impl !Freeze for TieredStorage
impl !RefUnwindSafe for TieredStorage
impl Send for TieredStorage
impl Sync for TieredStorage
impl Unpin for TieredStorage
impl UnwindSafe for TieredStorage
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more