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
- 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.
api private
5 * 1024 * 1024
- 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.
api private
10
- TEMPFILE_PREIX =
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.
api private
'aws-sdk-s3-upload_stream'.freeze
- 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.
34 35 36 37 38 39 |
# File 'lib/aws-sdk-s3/multipart_stream_uploader.rb', line 34 def initialize( = {}) @client = [:client] || Client.new @tempfile = [:tempfile] @part_size = [:part_size] || PART_SIZE @thread_count = [:thread_count] || 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.
42 43 44 |
# File 'lib/aws-sdk-s3/multipart_stream_uploader.rb', line 42 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.
48 49 50 51 52 53 54 |
# File 'lib/aws-sdk-s3/multipart_stream_uploader.rb', line 48 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 |