pub struct TaskQueue { /* private fields */ }Expand description
Cloneable task facade sharing the pool’s single state lock.
Implementations§
Source§impl TaskQueue
impl TaskQueue
pub fn new() -> Self
pub fn with_limits(limits: DistributedLimits) -> Result<Self, DistributedError>
Sourcepub fn enqueue(
&self,
expected_revision: u64,
now_secs: u64,
spec: TaskSpec,
) -> Result<Transition<ScanTask>, DistributedError>
pub fn enqueue( &self, expected_revision: u64, now_secs: u64, spec: TaskSpec, ) -> Result<Transition<ScanTask>, DistributedError>
Admit one fresh task at an exact coordinator revision.
Sourcepub fn peek_next(&self) -> Result<Option<ScanTask>, DistributedError>
pub fn peek_next(&self) -> Result<Option<ScanTask>, DistributedError>
Peek without consuming or mutating the task record.
pub fn get_task( &self, task_id: &str, ) -> Result<Option<ScanTask>, DistributedError>
Sourcepub fn tasks(&self) -> Result<Vec<ScanTask>, DistributedError>
pub fn tasks(&self) -> Result<Vec<ScanTask>, DistributedError>
Return tasks in stable task-ID order.
pub fn snapshot(&self) -> Result<StateSnapshot, DistributedError>
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TaskQueue
impl RefUnwindSafe for TaskQueue
impl Send for TaskQueue
impl Sync for TaskQueue
impl Unpin for TaskQueue
impl UnsafeUnpin for TaskQueue
impl UnwindSafe for TaskQueue
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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