Class: OCI::ObjectStorage::Transfer::UploadManagerConfig
- Inherits:
- 
      Object
      
        - Object
- OCI::ObjectStorage::Transfer::UploadManagerConfig
 
- Defined in:
- lib/oci/object_storage/transfer/upload_manager_config.rb
Overview
A bag of configuration properties that can be used to configure UploadManager
Instance Attribute Summary collapse
- 
  
    
      #allow_multipart  ⇒ Boolean 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Whether to allow multipart uploads or not. 
- 
  
    
      #allow_parallel_multipart_uploads  ⇒ Boolean 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    For multipart uploads, whether we can upload parts in parallel. 
- 
  
    
      #multipart_part_size  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The size, in bytes, of each part of a multipart upload. 
- 
  
    
      #multipart_upload_threshold  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The size, in bytes, which a file (or IO-like object) needs to exceed before we attempt a multipart upload. 
- 
  
    
      #non_file_io_multipart_part_size  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    The size, in bytes, of each part of a multipart upload when we are reading from stdin or a non-file IO-like source (e.g. a StringIO). 
- 
  
    
      #parallel_process_count  ⇒ Integer 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    How many parts we can upload in parallel. 
Instance Method Summary collapse
Constructor Details
#initialize(allow_multipart: true, allow_parallel_multipart_uploads: true, parallel_process_count: OCI::ObjectStorage::Transfer::Multipart::DEFAULT_PARALLEL_PROCESS_COUNT, multipart_upload_threshold: OCI::ObjectStorage::Transfer::MULTIPART_UPLOAD_THRESHOLD, multipart_part_size: OCI::ObjectStorage::Transfer::MULTIPART_PART_SIZE, non_file_io_multipart_part_size: OCI::ObjectStorage::Transfer::NON_FILE_IO_MULTIPART_PART_SIZE) ⇒ UploadManagerConfig
Creates a new UploadManagerConfig.
| 45 46 47 48 49 50 51 52 53 54 55 56 57 | # File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 45 def initialize(allow_multipart: true, allow_parallel_multipart_uploads: true, parallel_process_count: OCI::ObjectStorage::Transfer::Multipart::DEFAULT_PARALLEL_PROCESS_COUNT, multipart_upload_threshold: OCI::ObjectStorage::Transfer::MULTIPART_UPLOAD_THRESHOLD, multipart_part_size: OCI::ObjectStorage::Transfer::MULTIPART_PART_SIZE, non_file_io_multipart_part_size: OCI::ObjectStorage::Transfer::NON_FILE_IO_MULTIPART_PART_SIZE) @allow_multipart = allow_multipart @allow_parallel_multipart_uploads = allow_parallel_multipart_uploads @parallel_process_count = parallel_process_count @multipart_upload_threshold = multipart_upload_threshold @multipart_part_size = multipart_part_size @non_file_io_multipart_part_size = non_file_io_multipart_part_size end | 
Instance Attribute Details
#allow_multipart ⇒ Boolean
Whether to allow multipart uploads or not. Defaults to true
| 11 12 13 | # File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 11 def allow_multipart @allow_multipart end | 
#allow_parallel_multipart_uploads ⇒ Boolean
For multipart uploads, whether we can upload parts in parallel. Defaults to true
| 15 16 17 | # File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 15 def allow_parallel_multipart_uploads @allow_parallel_multipart_uploads end | 
#multipart_part_size ⇒ Integer
The size, in bytes, of each part of a multipart upload. This applies when we are uploading files from disk and defaults to 128 MiB
| 30 31 32 | # File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 30 def multipart_part_size @multipart_part_size end | 
#multipart_upload_threshold ⇒ Integer
The size, in bytes, which a file (or IO-like object) needs to exceed before we attempt a multipart upload. Defaults to 128 MiB (128 * 1024 * 1024 bytes)
| 25 26 27 | # File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 25 def multipart_upload_threshold @multipart_upload_threshold end | 
#non_file_io_multipart_part_size ⇒ Integer
The size, in bytes, of each part of a multipart upload when we are reading from stdin or a non-file IO-like source (e.g. a StringIO). Defaults to 10 MiB
| 35 36 37 | # File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 35 def non_file_io_multipart_part_size @non_file_io_multipart_part_size end | 
#parallel_process_count ⇒ Integer
How many parts we can upload in parallel. Defaults to 3. If this is set to 1, this is the equivalent of not allowing parts to be uploaded in parallel.
| 20 21 22 | # File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 20 def parallel_process_count @parallel_process_count end |