pub struct NamespaceSegmentManager { /* private fields */ }Expand description
Manages segments for a namespace
Implementations§
Source§impl NamespaceSegmentManager
impl NamespaceSegmentManager
Sourcepub fn new(namespace: NamespaceId, config: CompactionConfig) -> Self
pub fn new(namespace: NamespaceId, config: CompactionConfig) -> Self
Create a new namespace segment manager
Sourcepub fn segments_needing_compaction(&self) -> Vec<SegmentMetadata>
pub fn segments_needing_compaction(&self) -> Vec<SegmentMetadata>
Get segments that need compaction
Sourcepub fn small_segments(&self) -> Vec<SegmentMetadata>
pub fn small_segments(&self) -> Vec<SegmentMetadata>
Get small segments that could be merged
Sourcepub fn compact(&self, segment_ids: &[SegmentId]) -> Option<CompactionResult>
pub fn compact(&self, segment_ids: &[SegmentId]) -> Option<CompactionResult>
Perform compaction on specified segments
Sourcepub fn auto_compact(&self) -> Vec<CompactionResult>
pub fn auto_compact(&self) -> Vec<CompactionResult>
Run automatic compaction based on configuration
Sourcepub fn stats(&self) -> SegmentStats
pub fn stats(&self) -> SegmentStats
Get statistics
Auto Trait Implementations§
impl !Freeze for NamespaceSegmentManager
impl !RefUnwindSafe for NamespaceSegmentManager
impl Send for NamespaceSegmentManager
impl Sync for NamespaceSegmentManager
impl Unpin for NamespaceSegmentManager
impl UnsafeUnpin for NamespaceSegmentManager
impl UnwindSafe for NamespaceSegmentManager
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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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