/** * Abort the given multipart upload process. Also deletes any parts that may * have already been uploaded. * * @param upload * the multipart upload to abort. * @throws S3ServiceException */ public void multipartAbortUpload(MultipartUpload upload) throws S3ServiceException { multipartAbortUploadImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey()); }
/** * Abort the given multipart upload process. Also deletes any parts that may * have already been uploaded. * * @param upload * the multipart upload to abort. * @throws S3ServiceException */ public void multipartAbortUpload(MultipartUpload upload) throws S3ServiceException { multipartAbortUploadImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey()); }
/** * List the parts that have been uploaded for a given multipart upload. * * @param upload * the multipart upload whose parts will be listed. * @return * a list of multipart parts that have been successfully uploaded. * @throws S3ServiceException */ public List<MultipartPart> multipartListParts(MultipartUpload upload) throws S3ServiceException { return multipartListPartsImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey()); }
/** * List the parts that have been uploaded for a given multipart upload. * * @param upload * the multipart upload whose parts will be listed. * @return * a list of multipart parts that have been successfully uploaded. * @throws S3ServiceException */ public List<MultipartPart> multipartListParts(MultipartUpload upload) throws S3ServiceException { return multipartListPartsImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey()); }
/** * Complete a multipart upload by combining all the given parts into * the final object. * * @param upload * the multipart upload whose parts will be completed. * @param parts * the parts comprising the final object. * @return * information about the completion operation. * @throws S3ServiceException */ public MultipartCompleted multipartCompleteUpload(MultipartUpload upload, List<MultipartPart> parts) throws S3ServiceException { return multipartCompleteUploadImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey(), parts); }
/** * Complete a multipart upload by combining all the given parts into * the final object. * * @param upload * the multipart upload whose parts will be completed. * @param parts * the parts comprising the final object. * @return * information about the completion operation. * @throws S3ServiceException */ public MultipartCompleted multipartCompleteUpload(MultipartUpload upload, List<MultipartPart> parts) throws S3ServiceException { return multipartCompleteUploadImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey(), parts); }
@Override public void delete(final MultipartUpload upload) throws BackgroundException { if(log.isInfoEnabled()) { log.info(String.format("Delete multipart upload %s", upload.getUploadId())); } try { session.getClient().multipartAbortUpload(upload); } catch(S3ServiceException e) { throw new S3ExceptionMappingService().map("Cannot delete {0}", e, new Path(new Path(PathNormalizer.normalize(upload.getBucketName()), EnumSet.of(Path.Type.directory)), upload.getObjectKey(), EnumSet.of(Path.Type.file))); } } }
@Override public String toString() { return this.getClass().getName() + " [" + "uploadId=" + getUploadId() + ", bucketName=" + getBucketName() + ", objectKey=" + getObjectKey() + (metadata != null ? ", metadata=" + getMetadata() : "") + (storageClass != null ? ", storageClass=" + getStorageClass() : "") + (initiator != null ? ", initiator=" + getInitiator() : "") + (owner != null ? ", owner=" + getOwner() : "") + (initiatedDate != null ? ", initiatedDate=" + getInitiatedDate() : "") + ", multipartsPartsUploaded=" + multipartsPartsUploaded + "]"; }
@Override public String toString() { return this.getClass().getName() + " [" + "uploadId=" + getUploadId() + ", bucketName=" + getBucketName() + ", objectKey=" + getObjectKey() + (metadata != null ? ", metadata=" + getMetadata() : "") + (storageClass != null ? ", storageClass=" + getStorageClass() : "") + (initiator != null ? ", initiator=" + getInitiator() : "") + (owner != null ? ", owner=" + getOwner() : "") + (initiatedDate != null ? ", initiatedDate=" + getInitiatedDate() : "") + ", multipartsPartsUploaded=" + multipartsPartsUploaded + "]"; }
/** * Upload an individual part that will comprise a piece of a multipart upload object. * * @param upload * the multipart upload to which this part will be added. * @param partNumber * the part's number; must be between 1 and 10,000 and must uniquely identify a given * part and represent its order compared to all other parts. Part numbers need not * be sequential. * @param object * an object containing a input stream with data that will be sent to the storage service. * @return * information about the uploaded part, retain this information to eventually complete * the object with {@link #multipartCompleteUpload(MultipartUpload, List)}. * @throws S3ServiceException */ public MultipartPart multipartUploadPart(MultipartUpload upload, Integer partNumber, S3Object object) throws S3ServiceException { MultipartPart part = multipartUploadPartImpl(upload.getUploadId(), upload.getBucketName(), partNumber, object); upload.addMultipartPartToUploadedList(part); return part; }
/** * Upload an individual part that will comprise a piece of a multipart upload object. * * @param upload * the multipart upload to which this part will be added. * @param partNumber * the part's number; must be between 1 and 10,000 and must uniquely identify a given * part and represent its order compared to all other parts. Part numbers need not * be sequential. * @param object * an object containing a input stream with data that will be sent to the storage service. * @return * information about the uploaded part, retain this information to eventually complete * the object with {@link #multipartCompleteUpload(MultipartUpload, List)}. * @throws S3ServiceException */ public MultipartPart multipartUploadPart(MultipartUpload upload, Integer partNumber, S3Object object) throws S3ServiceException { MultipartPart part = multipartUploadPartImpl(upload.getUploadId(), upload.getBucketName(), partNumber, object); upload.addMultipartPartToUploadedList(part); return part; }
/** * Convenience method to complete a multipart upload by automatically finding * its parts. This method does more work than the lower-level * {@link #multipartCompleteUpload(MultipartUpload, List)} API operation, but * relieves the caller of having to keep track of all the parts uploaded * for a multipart upload. * * @param upload * the multipart upload whose parts will be completed. * @return * information about the completion operation. * @throws S3ServiceException */ public MultipartCompleted multipartCompleteUpload(MultipartUpload upload) throws S3ServiceException { List<MultipartPart> parts = multipartListParts(upload); return multipartCompleteUploadImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey(), parts); }
/** * Convenience method to complete a multipart upload by automatically finding * its parts. This method does more work than the lower-level * {@link #multipartCompleteUpload(MultipartUpload, List)} API operation, but * relieves the caller of having to keep track of all the parts uploaded * for a multipart upload. * * @param upload * the multipart upload whose parts will be completed. * @return * information about the completion operation. * @throws S3ServiceException */ public MultipartCompleted multipartCompleteUpload(MultipartUpload upload) throws S3ServiceException { List<MultipartPart> parts = multipartListParts(upload); return multipartCompleteUploadImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey(), parts); }
/** * From an existing object, copy an individual part that will comprise a piece of a * multipart upload object. * * @param upload * the multipart upload to which this part will be added. * @param partNumber * the part's number; must be between 1 and 10,000 and must uniquely identify a given * part and represent its order compared to all other parts. Part numbers need not * be sequential. * @param sourceBucketName * the name of the bucket that contains the original object. * @param sourceObjectKey * the key name of the original object. * * @return * information about the uploaded copy part, retain this information to eventually complete * the object with {@link #multipartCompleteUpload(MultipartUpload, List)}. * @throws S3ServiceException */ public MultipartPart multipartUploadPartCopy(MultipartUpload upload, Integer partNumber, String sourceBucketName, String sourceObjectKey) throws S3ServiceException { MultipartPart part = multipartUploadPartCopyImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey(), partNumber, sourceBucketName, sourceObjectKey, null, null, null, null, null, null, null); upload.addMultipartPartToUploadedList(part); return part; }
upload.getBucketName(), upload.getObjectKey(), partNumber, sourceBucketName, sourceObjectKey, null, null, null, null, null, null, versionId);
upload.getBucketName(), upload.getObjectKey(), partNumber, sourceBucketName, sourceObjectKey, null, null, null, null, null, null, versionId);
/** * From an existing object, copy an individual part that will comprise a piece of a * multipart upload object. * * @param upload * the multipart upload to which this part will be added. * @param partNumber * the part's number; must be between 1 and 10,000 and must uniquely identify a given * part and represent its order compared to all other parts. Part numbers need not * be sequential. * @param sourceBucketName * the name of the bucket that contains the original object. * @param sourceObjectKey * the key name of the original object. * * @return * information about the uploaded copy part, retain this information to eventually complete * the object with {@link #multipartCompleteUpload(MultipartUpload, List)}. * @throws S3ServiceException */ public MultipartPart multipartUploadPartCopy(MultipartUpload upload, Integer partNumber, String sourceBucketName, String sourceObjectKey) throws S3ServiceException { MultipartPart part = multipartUploadPartCopyImpl(upload.getUploadId(), upload.getBucketName(), upload.getObjectKey(), partNumber, sourceBucketName, sourceObjectKey, null, null, null, null, null, null, null); upload.addMultipartPartToUploadedList(part); return part; }
upload.getBucketName(), upload.getObjectKey(), partNumber, sourceBucketName, sourceObjectKey, ifModifiedSince, ifUnmodifiedSince,
upload.getBucketName(), upload.getObjectKey(), partNumber, sourceBucketName, sourceObjectKey, ifModifiedSince, ifUnmodifiedSince,