Java 类com.amazonaws.services.glacier.model.CompleteMultipartUploadRequest 实例源码

项目:meta-glacier    文件:Archive.java   
private String CompleteMultiPartUpload(String uploadId, String checksum)
        throws NoSuchAlgorithmException, IOException {
    File file = new File(localPath);
    CompleteMultipartUploadRequest compRequest
            = new CompleteMultipartUploadRequest()
            .withVaultName(vaultName)
            .withUploadId(uploadId)
            .withChecksum(checksum)
            .withArchiveSize(String.valueOf(file.length()));

    if (Thread.currentThread().isInterrupted()) {
        LGR.warning("upload job is interrupted.");
        return null;
    }
    return GlacierFrame.getClient(region).completeMultipartUpload(compRequest)
            .getArchiveId();
}
项目:omakase    文件:GlacierClient.java   
public String completeMultipartUpload(AWSCredentials awsCredentials, String region, String vault, String uploadId, long archiveSize, String archiveHash) {
    try {
        runtimeCredentialsProvider.setAwsCredentials(awsCredentials);
        amazonGlacier.setRegion(Region.getRegion(Regions.fromName(region)));

        CompleteMultipartUploadResult result = amazonGlacier.completeMultipartUpload(new CompleteMultipartUploadRequest(vault, uploadId, Long.toString(archiveSize), archiveHash));
        return result.getArchiveId();
    } catch (AmazonClientException e) {
        throw new OmakaseRuntimeException(e);
    }
}
项目:aws-sdk-java-resources    文件:MultipartUploadImpl.java   
@Override
public CompleteMultipartUploadResult complete(CompleteMultipartUploadRequest
        request, ResultCapture<CompleteMultipartUploadResult> extractor) {

    ActionResult result = resource.performAction("Complete", request,
            extractor);

    if (result == null) return null;
    return (CompleteMultipartUploadResult) result.getData();
}
项目:aws-sdk-java-resources    文件:MultipartUploadImpl.java   
@Override
public CompleteMultipartUploadResult complete(String checksum, String
        archiveSize, ResultCapture<CompleteMultipartUploadResult> extractor)
        {

    CompleteMultipartUploadRequest request = new
            CompleteMultipartUploadRequest()

        .withChecksum(checksum)
        .withArchiveSize(archiveSize);
    return complete(request, extractor);
}
项目:aws-sdk-java-resources    文件:MultipartUploadImpl.java   
@Override
public CompleteMultipartUploadResult complete(CompleteMultipartUploadRequest
        request) {

    return complete(request, null);
}
项目:aws-sdk-java-resources    文件:MultipartUpload.java   
/**
 * Performs the <code>Complete</code> action.
 *
 * <p>
 * The following request parameters will be populated from the data of this
 * <code>MultipartUpload</code> resource, and any conflicting parameter
 * value set in the request will be overridden:
 * <ul>
 *   <li>
 *     <b><code>AccountId</code></b>
 *         - mapped from the <code>AccountId</code> identifier.
 *   </li>
 *   <li>
 *     <b><code>VaultName</code></b>
 *         - mapped from the <code>VaultName</code> identifier.
 *   </li>
 *   <li>
 *     <b><code>UploadId</code></b>
 *         - mapped from the <code>Id</code> identifier.
 *   </li>
 * </ul>
 *
 * <p>
 *
 * @return The response of the low-level client operation associated with
 *         this resource action.
 * @see CompleteMultipartUploadRequest
 */
CompleteMultipartUploadResult complete(CompleteMultipartUploadRequest
        request);
项目:aws-sdk-java-resources    文件:MultipartUpload.java   
/**
 * Performs the <code>Complete</code> action and use a ResultCapture to
 * retrieve the low-level client response.
 *
 * <p>
 * The following request parameters will be populated from the data of this
 * <code>MultipartUpload</code> resource, and any conflicting parameter
 * value set in the request will be overridden:
 * <ul>
 *   <li>
 *     <b><code>AccountId</code></b>
 *         - mapped from the <code>AccountId</code> identifier.
 *   </li>
 *   <li>
 *     <b><code>VaultName</code></b>
 *         - mapped from the <code>VaultName</code> identifier.
 *   </li>
 *   <li>
 *     <b><code>UploadId</code></b>
 *         - mapped from the <code>Id</code> identifier.
 *   </li>
 * </ul>
 *
 * <p>
 *
 * @return The response of the low-level client operation associated with
 *         this resource action.
 * @see CompleteMultipartUploadRequest
 */
CompleteMultipartUploadResult complete(CompleteMultipartUploadRequest
        request, ResultCapture<CompleteMultipartUploadResult> extractor);