pub struct WorkloadScheduler { /* private fields */ }Expand description
Workload scheduler
Implementations§
Source§impl WorkloadScheduler
impl WorkloadScheduler
Sourcepub fn new(config: DistribCacheConfig) -> Self
pub fn new(config: DistribCacheConfig) -> Self
Create a new scheduler
Sourcepub fn schedule(&self, query: ScheduledQuery) -> ScheduleResult
pub fn schedule(&self, query: ScheduledQuery) -> ScheduleResult
Schedule a query
Sourcepub fn mark_complete(&self, workload: WorkloadType)
pub fn mark_complete(&self, workload: WorkloadType)
Mark a query as complete
Sourcepub fn get_distribution(&self) -> WorkloadDistribution
pub fn get_distribution(&self) -> WorkloadDistribution
Get workload distribution
Sourcepub fn stats(&self) -> SchedulerStatsSnapshot
pub fn stats(&self) -> SchedulerStatsSnapshot
Get scheduler statistics
Auto Trait Implementations§
impl !Freeze for WorkloadScheduler
impl !RefUnwindSafe for WorkloadScheduler
impl Send for WorkloadScheduler
impl Sync for WorkloadScheduler
impl Unpin for WorkloadScheduler
impl UnsafeUnpin for WorkloadScheduler
impl UnwindSafe for WorkloadScheduler
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