Class: Aws::S3::ObjectMultipartCopier Private
- Inherits:
-
Object
- Object
- Aws::S3::ObjectMultipartCopier
- Defined in:
- lib/aws-sdk-resources/services/s3/object_multipart_copier.rb
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defined Under Namespace
Classes: PartQueue
Constant Summary collapse
- FIVE_MB =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
5MB
5 * 1024 * 1024
- FILE_TOO_SMALL =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
"unable to multipart copy files smaller than 5MB"
- MAX_PARTS =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
10_000
Instance Attribute Summary collapse
- #client ⇒ Client readonly private
Instance Method Summary collapse
- #copy(options = {}) ⇒ Object private
-
#initialize(options = {}) ⇒ ObjectMultipartCopier
constructor
private
A new instance of ObjectMultipartCopier.
Constructor Details
#initialize(options = {}) ⇒ ObjectMultipartCopier
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of ObjectMultipartCopier.
20 21 22 23 24 |
# File 'lib/aws-sdk-resources/services/s3/object_multipart_copier.rb', line 20 def initialize( = {}) @thread_count = .delete(:thread_count) || 10 @min_part_size = .delete(:min_part_size) || (FIVE_MB * 10) @client = [:client] || Client.new end |
Instance Attribute Details
#client ⇒ Client (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
27 28 29 |
# File 'lib/aws-sdk-resources/services/s3/object_multipart_copier.rb', line 27 def client @client end |
Instance Method Details
#copy(options = {}) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
30 31 32 33 34 35 36 37 38 39 40 |
# File 'lib/aws-sdk-resources/services/s3/object_multipart_copier.rb', line 30 def copy( = {}) size = source_size() [:upload_id] = initiate_upload() begin parts = copy_parts(size, default_part_size(size), ) complete_upload(parts, ) rescue => error abort_upload() raise error end end |