pub struct BatchConfig { /* private fields */ }Expand description
Configuration for bulk operation batching and limits.
Controls various aspects of bulk operations including batch sizes, timeouts, processing limits, and UI behavior. Provides sensible defaults for all configuration values.
§Examples
use quetty_server::bulk_operations::BatchConfig;
// Use default configuration
let config = BatchConfig::default();
// Create custom configuration
let config = BatchConfig::new(100, 600);
// Access configuration values
println!("Max batch size: {}", config.max_batch_size());
println!("Timeout: {}s", config.operation_timeout_secs());Implementations§
Source§impl BatchConfig
impl BatchConfig
Sourcepub fn new(max_batch_size: u32, operation_timeout_secs: u64) -> Self
pub fn new(max_batch_size: u32, operation_timeout_secs: u64) -> Self
Creates a new BatchConfig with specified batch size and timeout.
Other configuration values will use their defaults when accessed.
§Arguments
max_batch_size- Maximum number of messages per batchoperation_timeout_secs- Timeout for bulk operations in seconds
§Returns
A new BatchConfig with the specified values
Sourcepub fn max_batch_size(&self) -> u32
pub fn max_batch_size(&self) -> u32
Get the maximum batch size for bulk operations
Sourcepub fn operation_timeout_secs(&self) -> u64
pub fn operation_timeout_secs(&self) -> u64
Get the timeout for bulk operations
Sourcepub fn bulk_chunk_size(&self) -> usize
pub fn bulk_chunk_size(&self) -> usize
Get the chunk size for bulk processing operations
Sourcepub fn bulk_processing_time_secs(&self) -> u64
pub fn bulk_processing_time_secs(&self) -> u64
Get the processing time limit for bulk operations in seconds
Sourcepub fn lock_timeout_secs(&self) -> u64
pub fn lock_timeout_secs(&self) -> u64
Get the timeout for lock operations in seconds
Sourcepub fn max_messages_to_process(&self) -> usize
pub fn max_messages_to_process(&self) -> usize
Get the maximum messages to process in bulk operations
Sourcepub fn auto_reload_threshold(&self) -> usize
pub fn auto_reload_threshold(&self) -> usize
Get the threshold for triggering auto-reload after bulk operations
Sourcepub fn receive_timeout_secs(&self) -> u64
pub fn receive_timeout_secs(&self) -> u64
Get the timeout for individual receive message operations in seconds
Trait Implementations§
Source§impl Clone for BatchConfig
impl Clone for BatchConfig
Source§fn clone(&self) -> BatchConfig
fn clone(&self) -> BatchConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more