Class: Aws::S3::MultipartFileUploader::PartList Private
- Inherits:
-
Object
- Object
- Aws::S3::MultipartFileUploader::PartList
- Defined in:
- lib/aws-sdk-s3/multipart_file_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.
Instance Method Summary collapse
- #clear! ⇒ Object private
-
#initialize(parts = []) ⇒ PartList
constructor
private
A new instance of PartList.
- #part_sizes ⇒ Object private
- #push(part) ⇒ Object private
- #shift ⇒ Object private
- #size ⇒ Object private
- #to_a ⇒ Object private
Constructor Details
#initialize(parts = []) ⇒ PartList
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 PartList.
217 218 219 220 |
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 217 def initialize(parts = []) @parts = parts @mutex = Mutex.new end |
Instance Method Details
#clear! ⇒ 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.
230 231 232 |
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 230 def clear! @mutex.synchronize { @parts.clear } end |
#part_sizes ⇒ 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.
238 239 240 |
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 238 def part_sizes @mutex.synchronize { @parts.map { |p| p[:body].size } } end |
#push(part) ⇒ 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.
222 223 224 |
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 222 def push(part) @mutex.synchronize { @parts.push(part) } end |
#shift ⇒ 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.
226 227 228 |
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 226 def shift @mutex.synchronize { @parts.shift } end |
#size ⇒ 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.
234 235 236 |
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 234 def size @mutex.synchronize { @parts.size } end |
#to_a ⇒ 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.
242 243 244 |
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 242 def to_a @mutex.synchronize { @parts.dup } end |