public class UploadObjectRequest extends AbstractPutObjectRequest implements MaterialsDescriptionProvider, java.io.Serializable
S3DataSource.Utils
Modifier and Type | Field and Description |
---|---|
private long |
diskLimit
Limitation (in bytes) on temporary disk space consumption for this
request; must be at least twice the amount of the specified
partSize . |
private java.util.concurrent.ExecutorService |
executorService
Optional configuration of a custom thread pool used for concurrent uploads.
|
private java.util.Map<java.lang.String,java.lang.String> |
materialsDescription
description of encryption materials to be used with this request.
|
(package private) static int |
MIN_PART_SIZE |
private MultiFileOutputStream |
multiFileOutputStream
Optional configuration of a custom mutli-file output stream used for
generating multiple parts for ciphertext.
|
private long |
partSize
Part size (in bytes).
|
private static long |
serialVersionUID |
private UploadObjectObserver |
uploadObjectObserver
Optional configuration of an object observer for advanced customization.
|
private ObjectMetadata |
uploadPartMetadata
Optional metadata to be included in each upload part requests.
|
NOOP
Constructor and Description |
---|
UploadObjectRequest(java.lang.String bucketName,
java.lang.String key,
java.io.File file) |
UploadObjectRequest(java.lang.String bucketName,
java.lang.String key,
java.io.InputStream input,
ObjectMetadata metadata) |
Modifier and Type | Method and Description |
---|---|
UploadObjectRequest |
clone()
Returns a clone (as deep as possible) of this request object.
|
long |
getDiskLimit()
Returns the maximum size (in bytes) of additional disk space that will be
consumed for this request; or
Long.MAX_VALUE if there is no
limit. |
java.util.concurrent.ExecutorService |
getExecutorService()
Returns a custom executor service for concurrent uploads; or null there
is no customization.
|
java.util.Map<java.lang.String,java.lang.String> |
getMaterialsDescription()
Returns an unmodifiable view of the MaterialsDescription which the caller
can use to load EncryptionMaterials from any
EncryptionMaterialsAccessor |
MultiFileOutputStream |
getMultiFileOutputStream()
Returns a custom multi-file output stream; or null if the default is to
be used.
|
long |
getPartSize()
Returns the part-size used for muti-part upload for this request.
|
UploadObjectObserver |
getUploadObjectObserver()
Returns a custom upload-object observer; or null there is no
customization.
|
ObjectMetadata |
getUploadPartMetadata()
Gets the optional metadata to be included in each UploadPart request.
|
void |
setMaterialsDescription(java.util.Map<java.lang.String,java.lang.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.
|
UploadObjectRequest |
withDiskLimit(long diskLimit)
Configured the maximum disk space (in bytes) that will be consumed for
this request.
|
UploadObjectRequest |
withExecutorService(java.util.concurrent.ExecutorService executorService)
Configure a custom executor service for concurrent uploads.
|
UploadObjectRequest |
withMaterialsDescription(java.util.Map<java.lang.String,java.lang.String> materialsDescription)
Fluent API for
setMaterialsDescription(Map) . |
UploadObjectRequest |
withMultiFileOutputStream(MultiFileOutputStream multiFileOutputStream)
Configure a custom multi-file output stream; or null if the default is
to be used.
|
UploadObjectRequest |
withPartSize(long partSize)
Configured the part size for multi-part upload.
|
UploadObjectRequest |
withUploadObjectObserver(UploadObjectObserver uploadObjectObserver)
Configure a custom upload-object observer; or null if the default is to
be used.
|
<T extends UploadObjectRequest> |
withUploadPartMetadata(ObjectMetadata partUploadMetadata)
Fluent API for
setUploadPartMetadata(ObjectMetadata) . |
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
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
private static final long serialVersionUID
static final int MIN_PART_SIZE
private ObjectMetadata uploadPartMetadata
private java.util.Map<java.lang.String,java.lang.String> materialsDescription
private long partSize
private transient java.util.concurrent.ExecutorService executorService
private transient MultiFileOutputStream multiFileOutputStream
private transient UploadObjectObserver uploadObjectObserver
private long diskLimit
partSize
. The default is .public UploadObjectRequest(java.lang.String bucketName, java.lang.String key, java.io.File file)
public UploadObjectRequest(java.lang.String bucketName, java.lang.String key, java.io.InputStream input, ObjectMetadata metadata)
public long getPartSize()
public UploadObjectRequest withPartSize(long partSize)
MIN_PART_SIZE
. This part size will be used as a reference for
the multi-part uploads but the physical part size may vary.public long getDiskLimit()
Long.MAX_VALUE
if there is no
limit.public UploadObjectRequest withDiskLimit(long diskLimit)
partSize
.public java.util.concurrent.ExecutorService getExecutorService()
public UploadObjectRequest withExecutorService(java.util.concurrent.ExecutorService executorService)
public MultiFileOutputStream getMultiFileOutputStream()
public UploadObjectRequest withMultiFileOutputStream(MultiFileOutputStream multiFileOutputStream)
public UploadObjectObserver getUploadObjectObserver()
public UploadObjectRequest withUploadObjectObserver(UploadObjectObserver uploadObjectObserver)
public java.util.Map<java.lang.String,java.lang.String> getMaterialsDescription()
MaterialsDescriptionProvider
EncryptionMaterialsAccessor
getMaterialsDescription
in interface MaterialsDescriptionProvider
public void setMaterialsDescription(java.util.Map<java.lang.String,java.lang.String> materialsDescription)
materialsDescription
- the materialsDescription to setpublic UploadObjectRequest withMaterialsDescription(java.util.Map<java.lang.String,java.lang.String> materialsDescription)
setMaterialsDescription(Map)
.public ObjectMetadata getUploadPartMetadata()
public void setUploadPartMetadata(ObjectMetadata partUploadMetadata)
public <T extends UploadObjectRequest> T withUploadPartMetadata(ObjectMetadata partUploadMetadata)
setUploadPartMetadata(ObjectMetadata)
.public UploadObjectRequest clone()
clone
in class AbstractPutObjectRequest
Object.clone()