use std::time::Duration;
use reifydb_core::event::EventBus;
use reifydb_runtime::{actor::system::ActorSystem, context::clock::Clock};
use crate::hot::storage::HotStorage;
#[derive(Clone)]
pub struct MultiStoreConfig {
pub hot: Option<HotConfig>,
pub warm: Option<WarmConfig>,
pub cold: Option<ColdConfig>,
pub retention: RetentionConfig,
pub merge_config: MergeConfig,
pub event_bus: EventBus,
pub actor_system: ActorSystem,
pub clock: Clock,
}
#[derive(Clone)]
pub struct HotConfig {
pub storage: HotStorage,
}
#[derive(Clone, Default)]
pub struct WarmConfig;
#[derive(Clone, Default)]
pub struct ColdConfig;
#[derive(Clone, Debug)]
pub struct RetentionConfig {
pub hot: Duration,
pub warm: Duration,
}
#[derive(Clone, Debug)]
pub struct MergeConfig {
pub merge_threshold_rows: usize,
pub merge_batch_size: usize,
pub enable_auto_eviction: bool,
}
impl Default for RetentionConfig {
fn default() -> Self {
Self {
hot: Duration::from_secs(300), warm: Duration::from_secs(3600), }
}
}
impl Default for MergeConfig {
fn default() -> Self {
Self {
merge_threshold_rows: 100_000,
merge_batch_size: 10_000,
enable_auto_eviction: true,
}
}
}