Package com.amazonaws.services.s3.model
Class UploadObjectRequest
java.lang.Object
com.amazonaws.AmazonWebServiceRequest
com.amazonaws.services.s3.model.AbstractPutObjectRequest
com.amazonaws.services.s3.model.UploadObjectRequest
- All Implemented Interfaces:
ReadLimitInfo
,MaterialsDescriptionProvider
,S3DataSource
,SSEAwsKeyManagementParamsProvider
,SSECustomerKeyProvider
,Serializable
,Cloneable
public class UploadObjectRequest
extends AbstractPutObjectRequest
implements MaterialsDescriptionProvider, Serializable
Used to request the client-side encryption and upload of a large S3 object
via pipelined parallel multi-part uploads.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.amazonaws.services.s3.model.S3DataSource
S3DataSource.Utils
-
Field Summary
Fields inherited from class com.amazonaws.AmazonWebServiceRequest
NOOP
-
Constructor Summary
ConstructorsConstructorDescriptionUploadObjectRequest
(String bucketName, String key, File file) UploadObjectRequest
(String bucketName, String key, InputStream input, ObjectMetadata metadata) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Returns a clone (as deep as possible) of this request object.long
Returns the maximum size (in bytes) of additional disk space that will be consumed for this request; orLong.MAX_VALUE
if there is no limit.Returns a custom executor service for concurrent uploads; or null there is no customization.Returns an unmodifiable view of the MaterialsDescription which the caller can use to load EncryptionMaterials from anyEncryptionMaterialsAccessor
com.amazonaws.services.s3.internal.MultiFileOutputStream
Returns a custom multi-file output stream; or null if the default is to be used.long
Returns the part-size used for muti-part upload for this request.Returns a custom upload-object observer; or null there is no customization.Gets the optional metadata to be included in each UploadPart request.void
setMaterialsDescription
(Map<String, String> materialsDescription) Sets the materials description for the encryption materials to be used with the current request.void
setUploadPartMetadata
(ObjectMetadata partUploadMetadata) Sets the optional metadata to be included in each UploadPart request.withDiskLimit
(long diskLimit) Configured the maximum disk space (in bytes) that will be consumed for this request.withExecutorService
(ExecutorService executorService) Configure a custom executor service for concurrent uploads.withMaterialsDescription
(Map<String, String> materialsDescription) Fluent API forsetMaterialsDescription(Map)
.withMultiFileOutputStream
(com.amazonaws.services.s3.internal.MultiFileOutputStream multiFileOutputStream) Configure a custom multi-file output stream; or null if the default is to be used.withPartSize
(long partSize) Configured the part size for multi-part upload.withUploadObjectObserver
(UploadObjectObserver uploadObjectObserver) Configure a custom upload-object observer; or null if the default is to be used.<T extends UploadObjectRequest>
TwithUploadPartMetadata
(ObjectMetadata partUploadMetadata) Fluent API forsetUploadPartMetadata(ObjectMetadata)
.Methods inherited from class com.amazonaws.services.s3.model.AbstractPutObjectRequest
copyPutObjectBaseTo, getAccessControlList, getBucketName, getCannedAcl, getFile, getInputStream, getKey, getMetadata, getProgressListener, getRedirectLocation, getSSEAwsKeyManagementParams, getSSECustomerKey, getStorageClass, setAccessControlList, setBucketName, setCannedAcl, setFile, setInputStream, setKey, setMetadata, setProgressListener, setRedirectLocation, setSSEAwsKeyManagementParams, setSSECustomerKey, setStorageClass, setStorageClass, withAccessControlList, withBucketName, withCannedAcl, withFile, withInputStream, withKey, withMetadata, withProgressListener, withRedirectLocation, withSSEAwsKeyManagementParams, withSSECustomerKey, withStorageClass, withStorageClass
Methods inherited from class com.amazonaws.AmazonWebServiceRequest
copyBaseTo, getCloneRoot, getCloneSource, getCustomQueryParameters, getCustomRequestHeaders, getGeneralProgressListener, getReadLimit, getRequestClientOptions, getRequestCredentials, getRequestCredentialsProvider, getRequestMetricCollector, getSdkClientExecutionTimeout, getSdkRequestTimeout, putCustomQueryParameter, putCustomRequestHeader, setGeneralProgressListener, setRequestCredentials, setRequestCredentialsProvider, setRequestMetricCollector, setSdkClientExecutionTimeout, setSdkRequestTimeout, withGeneralProgressListener, withRequestMetricCollector, withSdkClientExecutionTimeout, withSdkRequestTimeout
-
Constructor Details
-
UploadObjectRequest
-
UploadObjectRequest
public UploadObjectRequest(String bucketName, String key, InputStream input, ObjectMetadata metadata)
-
-
Method Details
-
getPartSize
public long getPartSize()Returns the part-size used for muti-part upload for this request. This part size will be used as a reference for the multi-part uploads but the physical part size may vary. -
withPartSize
Configured the part size for multi-part upload. Must be at leastMIN_PART_SIZE
. This part size will be used as a reference for the multi-part uploads but the physical part size may vary.- Returns:
- this object for method chaining purposes
-
getDiskLimit
public long getDiskLimit()Returns the maximum size (in bytes) of additional disk space that will be consumed for this request; orLong.MAX_VALUE
if there is no limit. -
withDiskLimit
Configured the maximum disk space (in bytes) that will be consumed for this request. The maximum disk space must be at least twice the size ofpartSize
.- Returns:
- this object for method chaining purposes
-
getExecutorService
Returns a custom executor service for concurrent uploads; or null there is no customization. -
withExecutorService
Configure a custom executor service for concurrent uploads.- Returns:
- this object for method chaining purposes
-
getMultiFileOutputStream
public com.amazonaws.services.s3.internal.MultiFileOutputStream getMultiFileOutputStream()Returns a custom multi-file output stream; or null if the default is to be used. -
withMultiFileOutputStream
public UploadObjectRequest withMultiFileOutputStream(com.amazonaws.services.s3.internal.MultiFileOutputStream multiFileOutputStream) Configure a custom multi-file output stream; or null if the default is to be used.- Returns:
- this object for method chaining purposes
-
getUploadObjectObserver
Returns a custom upload-object observer; or null there is no customization. -
withUploadObjectObserver
Configure a custom upload-object observer; or null if the default is to be used.- Returns:
- this object for method chaining purposes
-
getMaterialsDescription
Description copied from interface:MaterialsDescriptionProvider
Returns an unmodifiable view of the MaterialsDescription which the caller can use to load EncryptionMaterials from anyEncryptionMaterialsAccessor
- Specified by:
getMaterialsDescription
in interfaceMaterialsDescriptionProvider
- Returns:
- materials description.
-
setMaterialsDescription
Sets the materials description for the encryption materials to be used with the current request.- Parameters:
materialsDescription
- the materialsDescription to set
-
withMaterialsDescription
Fluent API forsetMaterialsDescription(Map)
. -
getUploadPartMetadata
Gets the optional metadata to be included in each UploadPart request. -
setUploadPartMetadata
Sets the optional metadata to be included in each UploadPart request. -
withUploadPartMetadata
Fluent API forsetUploadPartMetadata(ObjectMetadata)
. -
clone
Returns a clone (as deep as possible) of this request object.- Specified by:
clone
in classAbstractPutObjectRequest
- See Also:
-