BatchProcessor class

Utility class for processing items in batches with concurrency control.

This class provides functionality to process multiple items concurrently while respecting concurrency limits and handling errors appropriately.

Constructors

BatchProcessor()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
processBatch<T>({required List<String> items, required Future<T> processor(String item), int concurrency = 3, bool continueOnError = true}) Future<List<T>>
Processes a batch of items with controlled concurrency.
processBatchWithRetry<T>({required List<String> items, required Future<T> processor(String item), int concurrency = 3, int maxRetries = 2, Duration retryDelay = const Duration(seconds: 1), bool continueOnError = true}) Future<List<T>>
Processes items with retry logic.
processInChunks<T>({required List<String> items, required Future<T> processor(String item), int chunkSize = 10, int concurrency = 3, bool continueOnError = true}) Future<List<T>>
Processes items in chunks to reduce memory usage.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited