/** * Aborts the current multi-part assembly and all uploads * that are currently in progress. * @return */ public AbortMultipartUploadResponse abort() { // allow aborted calls to call abort again (in case the first call // failed) validateState(true); transferManager.abortAll(); // always mark upload as aborted to prevent any more parts // from being added, even if the actual abort call fails manifest.markUploadAborted(); return service.abortMultipartUpload( AbortMultipartUploadRequest.builder() .namespaceName(namespaceName) .bucketName(bucketName) .objectName(objectName) .uploadId(manifest.getUploadId()) .opcClientRequestId(createClientRequestId("-abort")) .build()); }