pub struct StrategyEvaluator { /* private fields */ }Expand description
Strategy evaluator for checkpoint trigger detection
Implementations§
Source§impl StrategyEvaluator
impl StrategyEvaluator
Sourcepub fn new(config: V2WALConfig) -> Self
pub fn new(config: V2WALConfig) -> Self
Create new strategy evaluator
Sourcepub fn should_checkpoint(
&self,
strategy: &CheckpointStrategy,
last_checkpoint_time: SystemTime,
checkpointed_lsn: u64,
) -> CheckpointResult<(bool, Option<CheckpointTrigger>)>
pub fn should_checkpoint( &self, strategy: &CheckpointStrategy, last_checkpoint_time: SystemTime, checkpointed_lsn: u64, ) -> CheckpointResult<(bool, Option<CheckpointTrigger>)>
Evaluate if checkpoint should be triggered based on strategy
Sourcepub fn get_strategy_metrics(
&self,
checkpointed_lsn: u64,
last_checkpoint_time: SystemTime,
) -> CheckpointResult<StrategyMetrics>
pub fn get_strategy_metrics( &self, checkpointed_lsn: u64, last_checkpoint_time: SystemTime, ) -> CheckpointResult<StrategyMetrics>
Get current metrics for strategy monitoring
Auto Trait Implementations§
impl Freeze for StrategyEvaluator
impl RefUnwindSafe for StrategyEvaluator
impl Send for StrategyEvaluator
impl Sync for StrategyEvaluator
impl Unpin for StrategyEvaluator
impl UnwindSafe for StrategyEvaluator
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> 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