pub struct CapacityPool { /* private fields */ }Expand description
The room compactions in progress hold on the volumes they write to, shared by every tree given the same pool.
Every tree keeps a pool of its own unless it is given one with
Config::compaction_capacity. Trees
whose files share volumes should share a pool: each then reserves against
what the others have still to write instead of counting on the same free
bytes. The account is kept in this process: room another process takes
shows only in the free space the volume reports.
§Examples
use lsm_tree::{CapacityPool, Config, SequenceNumberCounter};
use std::sync::Arc;
let pool = Arc::new(CapacityPool::default());
let a = Config::new(&a_dir, SequenceNumberCounter::default(), SequenceNumberCounter::default())
.compaction_capacity(Arc::clone(&pool));
let b = Config::new(&b_dir, SequenceNumberCounter::default(), SequenceNumberCounter::default())
.compaction_capacity(Arc::clone(&pool));Trait Implementations§
Source§impl Debug for CapacityPool
impl Debug for CapacityPool
Auto Trait Implementations§
impl !Freeze for CapacityPool
impl !RefUnwindSafe for CapacityPool
impl Send for CapacityPool
impl Sync for CapacityPool
impl Unpin for CapacityPool
impl UnsafeUnpin for CapacityPool
impl UnwindSafe for CapacityPool
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more