Class: Aws::S3::ObjectMultipartCopier Private
- Inherits:
-
Object
- Object
- Aws::S3::ObjectMultipartCopier
- Defined in:
- lib/aws-sdk-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.
28 29 30 31 32 33 |
# File 'lib/aws-sdk-s3/object_multipart_copier.rb', line 28 def initialize( = {}) @use_source_parts = .delete(:use_source_parts) || false @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.
36 37 38 |
# File 'lib/aws-sdk-s3/object_multipart_copier.rb', line 36 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.
39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/aws-sdk-s3/object_multipart_copier.rb', line 39 def copy( = {}) = () size = [:content_length] [:upload_id] = initiate_upload(.merge()) begin parts = copy_parts(size, default_part_size(size), ) complete_upload(parts, ) rescue => error abort_upload() raise error end end |