Skip to main content

OwnedEmbeddedWorkerShards

Struct OwnedEmbeddedWorkerShards 

Source
pub struct OwnedEmbeddedWorkerShards { /* private fields */ }
Expand description

One worker-local shard set for the slot-owned embedded path.

The worker owns every shard in this set exclusively, so routed operations execute without any mutex on the hot path.

Implementations§

Source§

impl OwnedEmbeddedWorkerShards

Source

pub fn shard_count(&self) -> usize

Source

pub fn route_mode(&self) -> EmbeddedRouteMode

Source

pub fn worker_shard_count(&self) -> usize

Source

pub fn owns_shard(&self, shard_id: usize) -> bool

Source

pub fn route_key(&self, key: &[u8]) -> EmbeddedKeyRoute

Source

pub fn prepare_point_key(&self, key: &[u8]) -> PreparedPointKey

Source

pub fn route_session(&self, session_prefix: &[u8]) -> EmbeddedSessionRoute

Source

pub fn begin_read_session(&mut self) -> OwnedEmbeddedWorkerReadSession<'_>

Source

pub fn get_ref_no_ttl_routed( &mut self, route: EmbeddedKeyRoute, key: &[u8], ) -> Option<&[u8]>

Source

pub fn get_prepared_ref_no_ttl( &mut self, prepared: &PreparedPointKey, ) -> Option<&[u8]>

Source

pub fn get_view_routed_no_ttl( &mut self, route: EmbeddedKeyRoute, key: &[u8], ) -> OwnedEmbeddedReadView

Source

pub fn set_slice_routed_no_ttl( &mut self, route: EmbeddedKeyRoute, key: &[u8], value: &[u8], )

Source

pub fn batch_set_session_slices_no_ttl<I, K, V>( &mut self, session_prefix: &[u8], items: I, )
where I: IntoIterator<Item = (K, V)>, K: AsRef<[u8]>, V: AsRef<[u8]>,

Source

pub fn batch_set_session_packed_no_ttl(&mut self, packed: PackedSessionWrite)

Source

pub fn batch_get_session_view_no_ttl( &mut self, session_prefix: &[u8], keys: &[Bytes], ) -> OwnedEmbeddedSessionBatchView

Source

pub fn batch_get_session_view_prehashed_no_ttl( &mut self, session_prefix: &[u8], keys: &[Bytes], key_hashes: &[u64], ) -> OwnedEmbeddedSessionBatchView

Source

pub fn batch_get_session_view_routed_no_ttl( &mut self, route: EmbeddedSessionRoute, keys: &[Bytes], ) -> OwnedEmbeddedSessionBatchView

Source

pub fn batch_get_session_view_prehashed_routed_no_ttl( &mut self, route: EmbeddedSessionRoute, keys: &[Bytes], key_hashes: &[u64], ) -> OwnedEmbeddedSessionBatchView

Source

pub fn batch_get_session_packed_no_ttl( &mut self, session_prefix: &[u8], keys: &[Bytes], ) -> PackedBatch

Source

pub fn batch_get_session_packed_routed_no_ttl( &mut self, route: EmbeddedSessionRoute, keys: &[Bytes], ) -> PackedBatch

Source

pub fn len(&self) -> usize

Source

pub fn is_empty(&self) -> bool

Source

pub fn process_maintenance(&mut self) -> usize

Source

pub fn restore_entries<I>(&mut self, entries: I)
where I: IntoIterator<Item = StoredEntry>,

Source

pub fn get(&mut self, key: &[u8]) -> Option<Bytes>

Source

pub fn get_view(&mut self, key: &[u8]) -> OwnedEmbeddedReadView

Source

pub fn batch_get(&mut self, keys: Vec<Bytes>) -> Vec<Option<Bytes>>

Source

pub fn batch_get_view(&mut self, keys: &[Bytes]) -> OwnedEmbeddedBatchReadView

Source

pub fn batch_get_session_view( &mut self, session_prefix: &[u8], keys: &[Bytes], ) -> OwnedEmbeddedSessionBatchView

Source

pub fn batch_get_session_view_prehashed( &mut self, session_prefix: &[u8], keys: &[Bytes], key_hashes: &[u64], ) -> OwnedEmbeddedSessionBatchView

Source

pub fn batch_get_session_packed_view_prehashed( &mut self, session_prefix: &[u8], keys: &[Bytes], key_hashes: &[u64], ) -> Option<OwnedEmbeddedSessionPackedView>

Source

pub fn batch_get_session_packed_view( &mut self, session_prefix: &[u8], keys: &[Bytes], ) -> Option<OwnedEmbeddedSessionPackedView>

Source

pub fn batch_get_session_packed( &mut self, session_prefix: &[u8], keys: &[Bytes], ) -> PackedBatch

Source

pub fn batch_get_packed(&mut self, keys: &[Bytes]) -> PackedBatch

Source

pub fn set(&mut self, key: Bytes, value: Bytes, ttl_ms: Option<u64>)

Source

pub fn batch_set(&mut self, items: Vec<(Bytes, Bytes)>, ttl_ms: Option<u64>)

Source

pub fn batch_set_session_owned_no_ttl( &mut self, session_prefix: Bytes, items: Vec<(Bytes, Bytes)>, )

Source

pub fn delete(&mut self, key: &[u8]) -> bool

Source

pub fn exists(&mut self, key: &[u8]) -> bool

Trait Implementations§

Source§

impl Debug for OwnedEmbeddedWorkerShards

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

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> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more