pub struct Daemon<K, V, S> {
pub hasher: S,
pub core: CoreCache<K, V>,
pub cmd_rx: Arc<LossyQueue<Command<K, V>>>,
pub hit_rx: Arc<LossyQueue<[usize; 64]>>,
pub poll_us: u64,
pub daemon_tick: Arc<AtomicU64>,
}Fields§
§hasher: S§core: CoreCache<K, V>§cmd_rx: Arc<LossyQueue<Command<K, V>>>§hit_rx: Arc<LossyQueue<[usize; 64]>>§poll_us: u64Configurable poll interval in microseconds (1 000–10 000 µs).
daemon_tick: Arc<AtomicU64>Monotonically increasing tick counter — incremented on every poll loop.
Implementations§
Source§impl<K, V, S> Daemon<K, V, S>
impl<K, V, S> Daemon<K, V, S>
pub fn new( hasher: S, capacity: usize, t1: Arc<T1<K, V>>, t2: Arc<T2<K, V>>, cache: Arc<Cache<K, V>>, cmd_rx: Arc<LossyQueue<Command<K, V>>>, hit_rx: Arc<LossyQueue<[usize; 64]>>, epoch: Arc<AtomicU32>, duration: u32, poll_us: u64, worker_states: Arc<[WorkerState]>, daemon_tick: Arc<AtomicU64>, is_cold_start: Arc<AtomicBool>, ) -> Self
Trait Implementations§
Auto Trait Implementations§
impl<K, V, S> !RefUnwindSafe for Daemon<K, V, S>
impl<K, V, S> !Sync for Daemon<K, V, S>
impl<K, V, S> !UnwindSafe for Daemon<K, V, S>
impl<K, V, S> Freeze for Daemon<K, V, S>where
S: Freeze,
impl<K, V, S> Unpin for Daemon<K, V, S>where
S: Unpin,
impl<K, V, S> UnsafeUnpin for Daemon<K, V, S>where
S: UnsafeUnpin,
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