pub struct QueueSet {
pub scan: BoundedQueue,
pub extract: BoundedQueue,
pub chunk: BoundedQueue,
pub keyword: BoundedQueue,
pub embedding: BoundedQueue,
pub maintenance: BoundedQueue,
}Expand description
The complete set of bounded queues for the scheduler (RFC-036 §7).
Fields§
§scan: BoundedQueue§extract: BoundedQueue§chunk: BoundedQueue§keyword: BoundedQueue§embedding: BoundedQueue§maintenance: BoundedQueueImplementations§
Source§impl QueueSet
impl QueueSet
pub fn new(capacity: &QueueCapacity) -> Self
Sourcepub fn queue_for(&mut self, kind: JobKind) -> &mut BoundedQueue
pub fn queue_for(&mut self, kind: JobKind) -> &mut BoundedQueue
Route a job to its natural queue by kind (RFC-036 §6).
Sourcepub fn total_pending(&self) -> usize
pub fn total_pending(&self) -> usize
Total pending jobs across all queues.
Sourcepub fn cancel_source(&mut self, source_id: &SourceId) -> usize
pub fn cancel_source(&mut self, source_id: &SourceId) -> usize
Cancel all queued jobs for a source (RFC-036 §12.3).
Sourcepub fn pop_next(&mut self, resource_mode: ResourceMode) -> Option<IndexJob>
pub fn pop_next(&mut self, resource_mode: ResourceMode) -> Option<IndexJob>
Pop the next job to run, respecting resource mode (RFC-036 §8, §13).
In UserActive mode, embedding is skipped so search is never
delayed (RFC-036 §9.2 embedding rule).
Auto Trait Implementations§
impl Freeze for QueueSet
impl RefUnwindSafe for QueueSet
impl Send for QueueSet
impl Sync for QueueSet
impl Unpin for QueueSet
impl UnsafeUnpin for QueueSet
impl UnwindSafe for QueueSet
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