public static class UploadManager.UploadRequest.UploadRequestBuilder extends Object
Constructor and Description |
---|
UploadRequestBuilder(InputStream inputStream,
long contentLength) |
Modifier and Type | Method and Description |
---|---|
UploadManager.UploadRequest.UploadRequestBuilder |
allowOverwrite(boolean allowOverwrite)
Configures whether or not the if-none-match header will be used to prevent overwrites
on PUT.
|
UploadManager.UploadRequest |
build(PutObjectRequest request)
Builds a new UploadRequest instance.
|
UploadManager.UploadRequest.UploadRequestBuilder |
parallelUploadExecutorService(ExecutorService parallelUploadExecutorService)
Sets the executor service that should be used if the upload being made uses
multi-part uploads.
|
UploadManager.UploadRequest.UploadRequestBuilder |
progressReporter(ProgressReporter progressReporter)
Sets the progress reporter that is used to notify of updates during the upload.
|
@ConstructorProperties(value={"inputStream","contentLength"}) public UploadRequestBuilder(InputStream inputStream, long contentLength)
public UploadManager.UploadRequest.UploadRequestBuilder allowOverwrite(boolean allowOverwrite)
Configures whether or not the if-none-match header will be used to prevent overwrites on PUT. If this is disabled, the ifNoneMatch value in the PutObjectRequest builder will be overwritten with “*”.
The default value is 'true'.
allowOverwrite
- true to allow objects to be overwritten, false if not.public UploadManager.UploadRequest.UploadRequestBuilder parallelUploadExecutorService(ExecutorService parallelUploadExecutorService)
Sets the executor service that should be used if the upload being made uses multi-part uploads. If none is provided, the UploadManager will create a new Executor per upload request. If the caller prefers to have a shared executor, one can be created by the caller and set on every UploadRequest through this method.
parallelUploadExecutorService
- The executor to use.public UploadManager.UploadRequest.UploadRequestBuilder progressReporter(ProgressReporter progressReporter)
Sets the progress reporter that is used to notify of updates during the upload. If none is provided, then no progress updates shall be reported.
progressReporter
- The progress reporter to use.public UploadManager.UploadRequest build(PutObjectRequest request)
Builds a new UploadRequest instance. The body and content length will be set on the given request based on the original values provided when creating the builder.
request
- The request containing all param except the body and content length.Copyright © 2016–2024. All rights reserved.