pub struct KifsFileHandlerOptions /* private fields */ Options for the KiFS file handler.
These options control the behavior of file uploads and downloads, including batch sizes and upload concurrency.
The fields are private and are set only through the validating with_* methods. A public file_size_to_split could be set to 0 or a negative number, which the multi-part part-count arithmetic divides by.
Example
Implementations
pub fn with_file_size_to_split(self, size: i64) -> Result<Self, KineticaError>
Sets the file size threshold for multi-part transfers.
size- Size in bytes. Must be a positive value <= 60 MB.
Fails if the size is <= 0 or > 60 MB.
pub fn with_thread_pool_size(self, size: usize) -> Result<Self, KineticaError>
Sets how many full-file upload batches are sent concurrently.
Uploads proceed in waves: up to this many batches are sent at once, and the next wave starts when every batch of the current one has finished.
size- Number of concurrent batches. Must be between 1 and the number of available CPUs.
Fails if the size is 0 or greater than the number of available CPUs.
pub fn with_max_upload_bytes_in_flight( self, bytes: i64, ) -> Result<Self, KineticaError>
Sets the ceiling on full-file upload payload bytes held in memory at once.
Lower it where memory is tight: an upload then waits for outstanding batches to finish more often, trading throughput for a smaller peak. Raise it for more throughput where memory is plentiful.
bytes- The ceiling in bytes. Must be positive.
Fails if bytes is <= 0.
pub fn with_termination_timeout(self, timeout: u64) -> Self
Sets the timeout for thread pool termination.
This has no effect. There are no thread pools to shut down: the upload tasks are awaited to completion, and aborted as soon as the operation’s future is dropped.
timeout- Timeout in seconds.
pub fn file_size_to_split(&self) -> i64
Returns the file size threshold for multi-part transfers.
pub fn thread_pool_size(&self) -> usize
Returns the number of full-file upload batches sent concurrently.
pub fn full_file_dispatcher_threadpool_size(&self) -> i32
Returns the number of full-file upload batches sent concurrently.
pub fn max_upload_bytes_in_flight(&self) -> i64
Returns the ceiling on full-file upload payload bytes held in memory at once.
pub fn termination_timeout(&self) -> u64
Returns the termination timeout.
Trait Implementations
impl Clone for KifsFileHandlerOptions
fn clone(&self) -> KifsFileHandlerOptions
fn clone_from(&mut self, source: &Self)
source. Read more