pub struct RepackScheduler { /* private fields */ }Expand description
Bounded background scheduler shared by native and hosted repack payloads.
Implementations§
Source§impl RepackScheduler
impl RepackScheduler
Sourcepub fn new(policy: RepackPolicy, limits: RepackResourceLimits) -> Self
pub fn new(policy: RepackPolicy, limits: RepackResourceLimits) -> Self
Construct a scheduler with configurable triggers and resource limits.
Sourcepub fn with_load_monitor(self, load: Arc<dyn LoadMonitor>) -> Self
pub fn with_load_monitor(self, load: Arc<dyn LoadMonitor>) -> Self
Install a foreground-load signal used by worker checkpoints.
Sourcepub fn with_backoff(
self,
success: Duration,
initial_failure: Duration,
maximum_failure: Duration,
) -> Self
pub fn with_backoff( self, success: Duration, initial_failure: Duration, maximum_failure: Duration, ) -> Self
Override success and exponential failure backoff windows.
Sourcepub fn schedule_if_needed(
&self,
operation: Arc<dyn RepackOperation>,
) -> Result<RepackSchedule, RepackError>
pub fn schedule_if_needed( &self, operation: Arc<dyn RepackOperation>, ) -> Result<RepackSchedule, RepackError>
Inspect thresholds and start a background operation when needed.
Sourcepub fn repack_now(
&self,
operation: Arc<dyn RepackOperation>,
) -> Result<RepackSchedule, RepackError>
pub fn repack_now( &self, operation: Arc<dyn RepackOperation>, ) -> Result<RepackSchedule, RepackError>
Start an operator-requested repack, bypassing heuristics and backoff.
Sourcepub fn repack_now_with_token(
&self,
operation: Arc<dyn RepackOperation>,
cancellation: CancellationToken,
) -> Result<RepackSchedule, RepackError>
pub fn repack_now_with_token( &self, operation: Arc<dyn RepackOperation>, cancellation: CancellationToken, ) -> Result<RepackSchedule, RepackError>
Start a manual repack controlled by an existing cancellation token.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for RepackScheduler
impl !UnwindSafe for RepackScheduler
impl Freeze for RepackScheduler
impl Send for RepackScheduler
impl Sync for RepackScheduler
impl Unpin for RepackScheduler
impl UnsafeUnpin for RepackScheduler
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