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
Constructors Constructor Description UploadObjectRequest(String bucketName, String key, File file)UploadObjectRequest(String bucketName, String key, InputStream input, ObjectMetadata metadata)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description UploadObjectRequestclone()Returns a clone (as deep as possible) of this request object.longgetDiskLimit()Returns the maximum size (in bytes) of additional disk space that will be consumed for this request; orLong.MAX_VALUEif there is no limit.ExecutorServicegetExecutorService()Returns a custom executor service for concurrent uploads; or null there is no customization.Map<String,String>getMaterialsDescription()Returns an unmodifiable view of the MaterialsDescription which the caller can use to load EncryptionMaterials from anyEncryptionMaterialsAccessorcom.amazonaws.services.s3.internal.MultiFileOutputStreamgetMultiFileOutputStream()Returns a custom multi-file output stream; or null if the default is to be used.longgetPartSize()Returns the part-size used for muti-part upload for this request.UploadObjectObservergetUploadObjectObserver()Returns a custom upload-object observer; or null there is no customization.ObjectMetadatagetUploadPartMetadata()Gets the optional metadata to be included in each UploadPart request.voidsetMaterialsDescription(Map<String,String> materialsDescription)Sets the materials description for the encryption materials to be used with the current request.voidsetUploadPartMetadata(ObjectMetadata partUploadMetadata)Sets the optional metadata to be included in each UploadPart request.UploadObjectRequestwithDiskLimit(long diskLimit)Configured the maximum disk space (in bytes) that will be consumed for this request.UploadObjectRequestwithExecutorService(ExecutorService executorService)Configure a custom executor service for concurrent uploads.UploadObjectRequestwithMaterialsDescription(Map<String,String> materialsDescription)Fluent API forsetMaterialsDescription(Map).UploadObjectRequestwithMultiFileOutputStream(com.amazonaws.services.s3.internal.MultiFileOutputStream multiFileOutputStream)Configure a custom multi-file output stream; or null if the default is to be used.UploadObjectRequestwithPartSize(long partSize)Configured the part size for multi-part upload.UploadObjectRequestwithUploadObjectObserver(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 Detail
-
UploadObjectRequest
public UploadObjectRequest(String bucketName, String key, InputStream input, ObjectMetadata metadata)
-
-
Method Detail
-
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
public UploadObjectRequest withPartSize(long partSize)
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_VALUEif there is no limit.
-
withDiskLimit
public UploadObjectRequest withDiskLimit(long diskLimit)
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
public ExecutorService getExecutorService()
Returns a custom executor service for concurrent uploads; or null there is no customization.
-
withExecutorService
public UploadObjectRequest withExecutorService(ExecutorService executorService)
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
public UploadObjectObserver getUploadObjectObserver()
Returns a custom upload-object observer; or null there is no customization.
-
withUploadObjectObserver
public UploadObjectRequest withUploadObjectObserver(UploadObjectObserver uploadObjectObserver)
Configure a custom upload-object observer; or null if the default is to be used.- Returns:
- this object for method chaining purposes
-
getMaterialsDescription
public Map<String,String> getMaterialsDescription()
Description copied from interface:MaterialsDescriptionProviderReturns an unmodifiable view of the MaterialsDescription which the caller can use to load EncryptionMaterials from anyEncryptionMaterialsAccessor- Specified by:
getMaterialsDescriptionin interfaceMaterialsDescriptionProvider- Returns:
- materials description.
-
setMaterialsDescription
public void setMaterialsDescription(Map<String,String> materialsDescription)
Sets the materials description for the encryption materials to be used with the current request.- Parameters:
materialsDescription- the materialsDescription to set
-
withMaterialsDescription
public UploadObjectRequest withMaterialsDescription(Map<String,String> materialsDescription)
Fluent API forsetMaterialsDescription(Map).
-
getUploadPartMetadata
public ObjectMetadata getUploadPartMetadata()
Gets the optional metadata to be included in each UploadPart request.
-
setUploadPartMetadata
public void setUploadPartMetadata(ObjectMetadata partUploadMetadata)
Sets the optional metadata to be included in each UploadPart request.
-
withUploadPartMetadata
public <T extends UploadObjectRequest> T withUploadPartMetadata(ObjectMetadata partUploadMetadata)
Fluent API forsetUploadPartMetadata(ObjectMetadata).
-
clone
public UploadObjectRequest clone()
Returns a clone (as deep as possible) of this request object.- Specified by:
clonein classAbstractPutObjectRequest- See Also:
Object.clone()
-
-