/** * 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()); }
/** * Build the instance of AbortMultipartUploadRequest as configured by this builder * * Note that this method takes calls to {@link Builder#invocationCallback(com.oracle.bmc.util.internal.Consumer)} into account, * while the method {@link Builder#buildWithoutInvocationCallback} does not. * * This is the preferred method to build an instance. * * @return instance of AbortMultipartUploadRequest */ public AbortMultipartUploadRequest build() { AbortMultipartUploadRequest request = buildWithoutInvocationCallback(); request.setInvocationCallback(invocationCallback); return request; } }
/** * Copy method to populate the builder with values from the given instance. * @return this builder instance */ public Builder copy(AbortMultipartUploadRequest o) { namespaceName(o.getNamespaceName()); bucketName(o.getBucketName()); objectName(o.getObjectName()); uploadId(o.getUploadId()); opcClientRequestId(o.getOpcClientRequestId()); invocationCallback(o.getInvocationCallback()); return this; }