Class: Aws::S3::MultipartFileUploader::PartList Private

Inherits:
Object
  • Object
show all
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

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.



163
164
165
166
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 163

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.



176
177
178
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 176

def clear!
  @mutex.synchronize { @parts.clear }
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.



168
169
170
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 168

def push(part)
  @mutex.synchronize { @parts.push(part) }
end

#shiftObject

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.



172
173
174
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 172

def shift
  @mutex.synchronize { @parts.shift }
end

#to_aObject

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.



180
181
182
# File 'lib/aws-sdk-s3/multipart_file_uploader.rb', line 180

def to_a
  @mutex.synchronize { @parts.dup }
end