use std::cell::RefCell;
use std::fmt;
use std::marker::PhantomData;
use std::ops::ControlFlow;
use std::rc::Rc;
use crate::cuda::{
CudaChunkTransferHit, CudaSessionChunkEvent, CudaSessionTransferRequest,
CudaSessionTransferStats,
};
use crate::storage::{
Bytes, EmbeddedKeyRoute, EmbeddedReadSlice, EmbeddedRouteMode, EmbeddedSessionRoute,
EmbeddedStore, OwnedEmbeddedBatchReadView, OwnedEmbeddedReadView, OwnedEmbeddedRefMut,
OwnedEmbeddedSessionPackedView, OwnedEmbeddedWorkerShards, PackedBatch, PackedSessionWrite,
PreparedPointKey, TierStatsSnapshot,
};
thread_local! {
static THREAD_LOCAL_EMBEDDED_STORE: RefCell<Option<WorkerLocalEmbeddedStore>> = const { RefCell::new(None) };
}
#[derive(Debug)]
pub struct WorkerLocalEmbeddedStore {
inner: OwnedEmbeddedWorkerShards,
}
#[derive(Debug)]
pub struct WorkerLocalEmbeddedStoreBootstrap {
stores: Vec<WorkerLocalEmbeddedStore>,
}
pub type WorkerLocalEmbeddedRefMut<'a> = OwnedEmbeddedRefMut<'a>;
mod bootstrap;
mod core;
mod errors;
mod lifecycle;
mod read;
#[cfg(test)]
mod tests;
mod thread_local;
mod views;
mod write;
pub use errors::{LocalRouteError, LocalStoreAccessError, LocalStoreInstallError};
pub use thread_local::{take_thread_local_embedded_store, with_thread_local_embedded_store};
use views::worker_local_batch_view_from_embedded;
pub use views::{
WorkerLocalBatchReadView, WorkerLocalReadSlice, WorkerLocalReadView,
WorkerLocalSessionBatchView,
};