pub struct ParallelBatchProcessor { /* private fields */ }
Expand description
Parallel batch processor with work-stealing queues
Implementations§
Source§impl ParallelBatchProcessor
impl ParallelBatchProcessor
Sourcepub fn new(config: BatchConfig) -> Self
pub fn new(config: BatchConfig) -> Self
Create a new parallel batch processor
Sourcepub fn set_progress_callback<F>(&self, callback: F)
pub fn set_progress_callback<F>(&self, callback: F)
Set a progress callback
Sourcepub fn is_cancelled(&self) -> bool
pub fn is_cancelled(&self) -> bool
Check if operations are cancelled
Sourcepub fn stats(&self) -> BatchStatsSummary
pub fn stats(&self) -> BatchStatsSummary
Get current statistics
Sourcepub fn errors(&self) -> Vec<OxirsError>
pub fn errors(&self) -> Vec<OxirsError>
Get accumulated errors
Sourcepub fn clear_errors(&self)
pub fn clear_errors(&self)
Clear accumulated errors
Sourcepub fn submit(&self, operation: BatchOperation) -> Result<(), OxirsError>
pub fn submit(&self, operation: BatchOperation) -> Result<(), OxirsError>
Submit a batch operation
Sourcepub fn submit_batch(
&self,
operations: Vec<BatchOperation>,
) -> Result<(), OxirsError>
pub fn submit_batch( &self, operations: Vec<BatchOperation>, ) -> Result<(), OxirsError>
Submit multiple operations
Sourcepub fn process<E, R>(&self, executor: E) -> Result<Vec<R>, OxirsError>
pub fn process<E, R>(&self, executor: E) -> Result<Vec<R>, OxirsError>
Process operations with the given executor
Sourcepub fn process_rayon<E, R>(&self, executor: E) -> Result<Vec<R>, OxirsError>
pub fn process_rayon<E, R>(&self, executor: E) -> Result<Vec<R>, OxirsError>
Process operations in parallel using rayon
Auto Trait Implementations§
impl Freeze for ParallelBatchProcessor
impl !RefUnwindSafe for ParallelBatchProcessor
impl Send for ParallelBatchProcessor
impl Sync for ParallelBatchProcessor
impl Unpin for ParallelBatchProcessor
impl !UnwindSafe for ParallelBatchProcessor
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