pub struct TieringManager { /* private fields */ }Expand description
Main tiering manager
Implementations§
Source§impl TieringManager
impl TieringManager
Sourcepub fn new(config: TieringConfig) -> Result<Self>
pub fn new(config: TieringConfig) -> Result<Self>
Create a new tiering manager
Sourcepub fn register_index(
&self,
index_id: String,
metadata: IndexMetadata,
) -> Result<()>
pub fn register_index( &self, index_id: String, metadata: IndexMetadata, ) -> Result<()>
Register a new index with metadata
Sourcepub fn store_index(
&self,
index_id: &str,
data: &[u8],
tier: StorageTier,
) -> Result<()>
pub fn store_index( &self, index_id: &str, data: &[u8], tier: StorageTier, ) -> Result<()>
Store index data in appropriate tier
Sourcepub fn load_index(&self, index_id: &str) -> Result<Vec<u8>>
pub fn load_index(&self, index_id: &str) -> Result<Vec<u8>>
Load index data from its current tier
Sourcepub fn transition_index(
&self,
index_id: &str,
target_tier: StorageTier,
reason: TierTransitionReason,
) -> Result<()>
pub fn transition_index( &self, index_id: &str, target_tier: StorageTier, reason: TierTransitionReason, ) -> Result<()>
Transition an index between tiers
Sourcepub fn optimize_tiers(&self) -> Result<Vec<TierOptimizationRecommendation>>
pub fn optimize_tiers(&self) -> Result<Vec<TierOptimizationRecommendation>>
Run tier optimization and return recommendations
Sourcepub fn apply_optimizations(&self, limit: Option<usize>) -> Result<Vec<String>>
pub fn apply_optimizations(&self, limit: Option<usize>) -> Result<Vec<String>>
Apply optimization recommendations automatically
Sourcepub fn get_tier_statistics(&self) -> HashMap<StorageTier, TierStatistics>
pub fn get_tier_statistics(&self) -> HashMap<StorageTier, TierStatistics>
Get statistics for all tiers
Sourcepub fn get_index_metadata(&self, index_id: &str) -> Option<IndexMetadata>
pub fn get_index_metadata(&self, index_id: &str) -> Option<IndexMetadata>
Get index metadata
Sourcepub fn list_indices(&self) -> Vec<String>
pub fn list_indices(&self) -> Vec<String>
List all registered indices
Sourcepub fn get_metrics(&self) -> Arc<TierMetrics>
pub fn get_metrics(&self) -> Arc<TierMetrics>
Get metrics
Sourcepub fn cleanup_history(&self)
pub fn cleanup_history(&self)
Cleanup old access history
Auto Trait Implementations§
impl Freeze for TieringManager
impl !RefUnwindSafe for TieringManager
impl Send for TieringManager
impl Sync for TieringManager
impl Unpin for TieringManager
impl !UnwindSafe for TieringManager
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
Checks if
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
Use with care! Same as
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.