pub struct BatchProcessor { /* private fields */ }
Expand description
Batch processor for efficient record processing
Implementations§
Source§impl BatchProcessor
impl BatchProcessor
Sourcepub fn with_config(config: BatchProcessorConfig) -> Self
pub fn with_config(config: BatchProcessorConfig) -> Self
Create a new batch processor with custom configuration
Sourcepub fn process_batch<R: Read + Seek>(
&mut self,
reader: &mut R,
record_offsets: &[u64],
requested_fields: &HashSet<AllocationField>,
) -> Result<RecordBatch, BinaryExportError>
pub fn process_batch<R: Read + Seek>( &mut self, reader: &mut R, record_offsets: &[u64], requested_fields: &HashSet<AllocationField>, ) -> Result<RecordBatch, BinaryExportError>
Process a batch of records from the given reader
Sourcepub fn process_with_prefetch<R: Read + Seek>(
&mut self,
reader: &mut R,
record_offsets: &[u64],
requested_fields: &HashSet<AllocationField>,
) -> Result<Vec<PartialAllocationInfo>, BinaryExportError>
pub fn process_with_prefetch<R: Read + Seek>( &mut self, reader: &mut R, record_offsets: &[u64], requested_fields: &HashSet<AllocationField>, ) -> Result<Vec<PartialAllocationInfo>, BinaryExportError>
Process records with intelligent prefetching
Sourcepub fn process_streaming<R: Read + Seek, F>(
&mut self,
reader: &mut R,
record_offsets: &[u64],
requested_fields: &HashSet<AllocationField>,
callback: F,
) -> Result<usize, BinaryExportError>
pub fn process_streaming<R: Read + Seek, F>( &mut self, reader: &mut R, record_offsets: &[u64], requested_fields: &HashSet<AllocationField>, callback: F, ) -> Result<usize, BinaryExportError>
Process records in streaming mode with batching
Sourcepub fn get_stats(&self) -> &BatchProcessorStats
pub fn get_stats(&self) -> &BatchProcessorStats
Get processing statistics
Sourcepub fn reset_stats(&mut self)
pub fn reset_stats(&mut self)
Reset processing statistics
Sourcepub fn clear_cache(&mut self)
pub fn clear_cache(&mut self)
Clear the record cache
Sourcepub fn cache_size(&self) -> usize
pub fn cache_size(&self) -> usize
Get cache size
Trait Implementations§
Auto Trait Implementations§
impl Freeze for BatchProcessor
impl RefUnwindSafe for BatchProcessor
impl Send for BatchProcessor
impl Sync for BatchProcessor
impl Unpin for BatchProcessor
impl UnwindSafe for BatchProcessor
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