public class MultipartManifestImpl extends Object implements MultipartManifest
Manifest impl that provides thread-safe access to an ongoing manifest upload.
Constructor and Description |
---|
MultipartManifestImpl(String uploadId) |
Modifier and Type | Method and Description |
---|---|
String |
getUploadId()
Gets the upload ID associated with the multi-part upload.
|
boolean |
isUploadAborted()
Check to see if abort has been called on the upload.
|
boolean |
isUploadComplete()
Check to see whether all parts have completed (successfully or unsuccessfully).
|
boolean |
isUploadSuccessful()
Check to see whether all parts have completed successfully.
|
List<CommitMultipartUploadPartDetails> |
listCompletedParts()
Lists all currently parts that have completed upload so far.
|
List<Integer> |
listFailedParts()
Lists the part numbers for all parts that have failed to upload so far.
|
List<MultipartUploadFailedPartDetails> |
listFailedPartsDetails()
Lists all the parts that have failed to upload and the cause of the failure
|
List<Integer> |
listInProgressParts()
Lists the part numbers for all parts that have currently not been uploaded or are in
progress.
|
void |
markUploadAborted() |
Integer |
nextPartNumber()
Gets the next part number that should be assigned to an upload part.
|
void |
registerExisting(MultipartUploadPartSummary part)
Register a upload that was previously completed (ie, to backfill previously completed parts).
|
void |
registerFailure(int partNumber)
Register a failed upload.
|
void |
registerFailure(int partNumber,
Exception failureException)
Register a failed upload and the failure cause.
|
void |
registerSuccess(int partNumber,
UploadPartResponse part)
Register a successful upload.
|
void |
registerTransfer(int partNumber)
Register a part that will will be uploaded using the given part number.
|
@ConstructorProperties(value="uploadId") public MultipartManifestImpl(String uploadId)
public void registerTransfer(int partNumber)
Register a part that will will be uploaded using the given part number.
partNumber
- The part number that will be uploaded.public void registerSuccess(int partNumber, UploadPartResponse part)
Register a successful upload.
Must have called registerTransfer(int)
first.
partNumber
- The part number of the successful uploadpart
- public void registerExisting(MultipartUploadPartSummary part)
Register a upload that was previously completed (ie, to backfill previously completed parts).
Do not have to call registerTransfer(int)
first.
part
- public void registerFailure(int partNumber)
Register a failed upload.
Must have called registerTransfer(int)
first.
partNumber
- The failed part numberpublic void registerFailure(int partNumber, Exception failureException)
Register a failed upload and the failure cause.
Must have called registerTransfer(int)
first.
partNumber
- The failed part numberpublic boolean isUploadComplete()
MultipartManifest
Check to see whether all parts have completed (successfully or unsuccessfully).
isUploadComplete
in interface MultipartManifest
public boolean isUploadSuccessful()
MultipartManifest
Check to see whether all parts have completed successfully.
isUploadSuccessful
in interface MultipartManifest
public List<CommitMultipartUploadPartDetails> listCompletedParts()
MultipartManifest
Lists all currently parts that have completed upload so far.
listCompletedParts
in interface MultipartManifest
public List<Integer> listFailedParts()
MultipartManifest
Lists the part numbers for all parts that have failed to upload so far.
listFailedParts
in interface MultipartManifest
public List<Integer> listInProgressParts()
MultipartManifest
Lists the part numbers for all parts that have currently not been uploaded or are in progress.
In the event that an upload is aborted, parts that have not been started yet will show up as in-progress in the manifest.
listInProgressParts
in interface MultipartManifest
public List<MultipartUploadFailedPartDetails> listFailedPartsDetails()
MultipartManifest
Lists all the parts that have failed to upload and the cause of the failure
listFailedPartsDetails
in interface MultipartManifest
public boolean isUploadAborted()
MultipartManifest
Check to see if abort has been called on the upload. Once aborted, the upload cannot have anymore parts added to it.
isUploadAborted
in interface MultipartManifest
public void markUploadAborted()
public Integer nextPartNumber()
Gets the next part number that should be assigned to an upload part.
The returned part number will not be assigned again by this manifest.
public String getUploadId()
MultipartManifest
Gets the upload ID associated with the multi-part upload.
getUploadId
in interface MultipartManifest
Copyright © 2016–2024. All rights reserved.