pub struct TierConfig {
pub hot_capacity: usize,
pub warm_capacity: usize,
pub cold_capacity: usize,
pub promotion_batch: usize,
}Expand description
Capacity settings for the hot, warm, and cold in-memory tiers.
Fields§
§hot_capacity: usizeTarget number of entries in the CPU-cache-sized hot tier.
warm_capacity: usizeTarget number of entries in the warm tier.
cold_capacity: usizeTarget number of entries in the cold tier.
promotion_batch: usizeMaximum number of entries promoted during one maintenance pass.
Implementations§
Source§impl TierConfig
impl TierConfig
Sourcepub fn from_geometry(geometry: CacheGeometry, shard_count: usize) -> Self
pub fn from_geometry(geometry: CacheGeometry, shard_count: usize) -> Self
Builds tier capacities from CPU cache geometry and shard count.
Trait Implementations§
Source§impl Clone for TierConfig
impl Clone for TierConfig
Source§fn clone(&self) -> TierConfig
fn clone(&self) -> TierConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TierConfig
impl Debug for TierConfig
Source§impl Default for TierConfig
impl Default for TierConfig
Source§impl<'de> Deserialize<'de> for TierConfigwhere
TierConfig: Default,
impl<'de> Deserialize<'de> for TierConfigwhere
TierConfig: Default,
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for TierConfig
impl RefUnwindSafe for TierConfig
impl Send for TierConfig
impl Sync for TierConfig
impl Unpin for TierConfig
impl UnsafeUnpin for TierConfig
impl UnwindSafe for TierConfig
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