Skip to main content

ColdStartSession

Struct ColdStartSession 

Source
pub struct ColdStartSession<'a, K, V, S, Tls: TlsProvider> { /* private fields */ }
Expand description

A session object for injecting items directly into T1 during cold starts. By requiring a session object, we prevent accidental use of insert_t1 in normal hot paths which would bypass TLS batching and overload the daemon.

Implementations§

Source§

impl<'a, K, V, S, Tls: TlsProvider> ColdStartSession<'a, K, V, S, Tls>
where K: Hash + Eq + Send + Sync + Clone + 'static, V: Send + Sync + Clone + 'static, S: BuildHasher + Clone + Send + 'static,

Source

pub fn warmup(&self, key: K, value: V)

Insert a key-value pair directly as a high-priority “genius” item. This bypasses the L1 probation filter, doesn’t use the thread-local batch buffer, and assigns the item the maximum survival rank (e.g. 255) and promotes it to T1 immediately.

Auto Trait Implementations§

§

impl<'a, K, V, S, Tls> Freeze for ColdStartSession<'a, K, V, S, Tls>

§

impl<'a, K, V, S, Tls> !RefUnwindSafe for ColdStartSession<'a, K, V, S, Tls>

§

impl<'a, K, V, S, Tls> Send for ColdStartSession<'a, K, V, S, Tls>
where S: Sync, K: Send + Sync, V: Send + Sync,

§

impl<'a, K, V, S, Tls> Sync for ColdStartSession<'a, K, V, S, Tls>
where S: Sync, K: Send + Sync, V: Send + Sync,

§

impl<'a, K, V, S, Tls> Unpin for ColdStartSession<'a, K, V, S, Tls>

§

impl<'a, K, V, S, Tls> UnsafeUnpin for ColdStartSession<'a, K, V, S, Tls>

§

impl<'a, K, V, S, Tls> !UnwindSafe for ColdStartSession<'a, K, V, S, Tls>

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.