Class: Aws::S3::MultipartStreamUploader Private
- Inherits:
-
Object
- Object
- Aws::S3::MultipartStreamUploader
- Defined in:
- lib/aws-sdk-s3/multipart_stream_uploader.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.
Constant Summary collapse
- DEFAULT_PART_SIZE =
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
- DEFAULT_THREAD_COUNT =
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
- CREATE_OPTIONS =
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.
Set.new(Client.api.operation(:create_multipart_upload).input.shape.member_names)
- UPLOAD_PART_OPTIONS =
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.
Set.new(Client.api.operation(:upload_part).input.shape.member_names)
- COMPLETE_UPLOAD_OPTIONS =
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.
Set.new(Client.api.operation(:complete_multipart_upload).input.shape.member_names)
Instance Attribute Summary collapse
- #client ⇒ Client readonly private
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ MultipartStreamUploader
constructor
private
A new instance of MultipartStreamUploader.
-
#upload(options = {}, &block) ⇒ Seahorse::Client::Response
private
-
the CompleteMultipartUploadResponse.
-
Constructor Details
#initialize(options = {}) ⇒ MultipartStreamUploader
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 MultipartStreamUploader.
20 21 22 23 24 25 |
# File 'lib/aws-sdk-s3/multipart_stream_uploader.rb', line 20 def initialize( = {}) @client = [:client] || Client.new @tempfile = [:tempfile] @part_size = [:part_size] || DEFAULT_PART_SIZE @thread_count = [:thread_count] || DEFAULT_THREAD_COUNT 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.
28 29 30 |
# File 'lib/aws-sdk-s3/multipart_stream_uploader.rb', line 28 def client @client end |
Instance Method Details
#upload(options = {}, &block) ⇒ Seahorse::Client::Response
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 - the CompleteMultipartUploadResponse.
34 35 36 37 38 39 40 |
# File 'lib/aws-sdk-s3/multipart_stream_uploader.rb', line 34 def upload( = {}, &block) Aws::Plugins::UserAgent.metric('S3_TRANSFER') do upload_id = initiate_upload() parts = upload_parts(upload_id, , &block) complete_upload(upload_id, parts, ) end end |