Class: OCI::ObjectStorage::Transfer::UploadManagerConfig

Inherits:
Object
  • Object
show all
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

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.



44
45
46
47
48
49
50
51
52
53
54
55
56
# File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 44

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_multipartBoolean

Whether to allow multipart uploads or not. Defaults to true



10
11
12
# File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 10

def allow_multipart
  @allow_multipart
end

#allow_parallel_multipart_uploadsBoolean

For multipart uploads, whether we can upload parts in parallel. Defaults to true



14
15
16
# File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 14

def allow_parallel_multipart_uploads
  @allow_parallel_multipart_uploads
end

#multipart_part_sizeInteger

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



29
30
31
# File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 29

def multipart_part_size
  @multipart_part_size
end

#multipart_upload_thresholdInteger

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)



24
25
26
# File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 24

def multipart_upload_threshold
  @multipart_upload_threshold
end

#non_file_io_multipart_part_sizeInteger

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



34
35
36
# File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 34

def non_file_io_multipart_part_size
  @non_file_io_multipart_part_size
end

#parallel_process_countInteger

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.



19
20
21
# File 'lib/oci/object_storage/transfer/upload_manager_config.rb', line 19

def parallel_process_count
  @parallel_process_count
end