Tabnine Logo
UploadResult
Code IndexAdd Tabnine to your IDE (free)

How to use
UploadResult
in
com.amazonaws.services.s3.transfer.model

Best Java code snippets using com.amazonaws.services.s3.transfer.model.UploadResult (Showing top 9 results out of 315)

origin: aws/aws-sdk-java

/**
 * Uploads the given request in a single chunk and returns the result.
 */
private UploadResult uploadInOneChunk() {
  PutObjectResult putObjectResult = s3.putObject(origReq);
  UploadResult uploadResult = new UploadResult();
  uploadResult.setBucketName(origReq.getBucketName());
  uploadResult.setKey(origReq.getKey());
  uploadResult.setETag(putObjectResult.getETag());
  uploadResult.setVersionId(putObjectResult.getVersionId());
  return uploadResult;
}
origin: EMCECS/ecs-sync

  @Override
  public String call() throws Exception {
    return upload.waitForUploadResult().getETag();
  }
}, OPERATION_MPU);
origin: io.ifar.skid-road/skid-road

@Override
public void put(String uri, File f) throws AmazonClientException {
  LOG.trace("Uploading " + uri);
  String[] parts = pieces(uri);
  ObjectMetadata om = new ObjectMetadata();
  om.setContentLength(f.length());
  if (f.getName().endsWith("gzip")) {
    om.setContentEncoding("gzip");
  }
  uploadsInProgress.incrementAndGet();
  try {
    PutObjectRequest req = new PutObjectRequest(parts[0],parts[1],f);
    req.setMetadata(om);
    UploadResult resp = svc.upload(req).waitForUploadResult();
    LOG.trace("Uploaded " + uri + " with ETag " + resp.getETag());
  } catch (InterruptedException ie) {
    LOG.error("Interrupted while uploading {} to {}.",
        f.getPath(), uri);
    throw Throwables.propagate(ie);
  } finally {
    uploadsInProgress.decrementAndGet();
  }
}
origin: aws/aws-sdk-java

UploadResult uploadResult = new UploadResult();
uploadResult.setBucketName(res.getBucketName());
uploadResult.setKey(res.getKey());
uploadResult.setETag(res.getETag());
uploadResult.setVersionId(res.getVersionId());
return uploadResult;
origin: io.digdag/digdag-storage-s3

UploadResult result = transferManager.upload(req).waitForUploadResult();
return result.getETag();
origin: aws/aws-sdk-java

@Override
public UploadResult call() throws Exception {
  CompleteMultipartUploadResult res;
  try {
    CompleteMultipartUploadRequest req = new CompleteMultipartUploadRequest(
        origReq.getBucketName(), origReq.getKey(), uploadId,
        collectPartETags())
        .withRequesterPays(origReq.isRequesterPays())
      .withGeneralProgressListener(origReq.getGeneralProgressListener())
      .withRequestMetricCollector(origReq.getRequestMetricCollector())
      ;
    res = s3.completeMultipartUpload(req);
  } catch (Exception e) {
    monitor.uploadFailure();
    publishProgress(listener, ProgressEventType.TRANSFER_FAILED_EVENT);
    throw e;
  }
  UploadResult uploadResult = new UploadResult();
  uploadResult.setBucketName(origReq
      .getBucketName());
  uploadResult.setKey(origReq.getKey());
  uploadResult.setETag(res.getETag());
  uploadResult.setVersionId(res.getVersionId());
  monitor.uploadComplete();
  return uploadResult;
}
origin: Nextdoor/bender

/**
 * Uploads the given request in a single chunk and returns the result.
 */
private UploadResult uploadInOneChunk() {
  PutObjectResult putObjectResult = s3.putObject(origReq);
  UploadResult uploadResult = new UploadResult();
  uploadResult.setBucketName(origReq.getBucketName());
  uploadResult.setKey(origReq.getKey());
  uploadResult.setETag(putObjectResult.getETag());
  uploadResult.setVersionId(putObjectResult.getVersionId());
  return uploadResult;
}
origin: Nextdoor/bender

@Override
public UploadResult call() throws Exception {
  CompleteMultipartUploadResult res;
  try {
    CompleteMultipartUploadRequest req = new CompleteMultipartUploadRequest(
        origReq.getBucketName(), origReq.getKey(), uploadId,
        collectPartETags())
        .withRequesterPays(origReq.isRequesterPays())
      .withGeneralProgressListener(origReq.getGeneralProgressListener())
      .withRequestMetricCollector(origReq.getRequestMetricCollector())
      ;
    res = s3.completeMultipartUpload(req);
  } catch (Exception e) {
    publishProgress(listener, ProgressEventType.TRANSFER_FAILED_EVENT);
    throw e;
  }
  UploadResult uploadResult = new UploadResult();
  uploadResult.setBucketName(origReq
      .getBucketName());
  uploadResult.setKey(origReq.getKey());
  uploadResult.setETag(res.getETag());
  uploadResult.setVersionId(res.getVersionId());
  monitor.uploadComplete();
  return uploadResult;
}
origin: Nextdoor/bender

UploadResult uploadResult = new UploadResult();
uploadResult.setBucketName(res.getBucketName());
uploadResult.setKey(res.getKey());
uploadResult.setETag(res.getETag());
uploadResult.setVersionId(res.getVersionId());
return uploadResult;
com.amazonaws.services.s3.transfer.modelUploadResult

Javadoc

Contains information returned by Amazon S3 for a completed upload.

See TransferManager for more information about creating transfers.

Most used methods

  • getETag
  • <init>
  • setBucketName
    Sets the name of the bucket containing the uploaded object.
  • setETag
    Sets the entity tag identifying the new object. An entity tag is an opaque string that changes if an
  • setKey
    Sets the key of the newly created object.
  • setVersionId
    Sets the version ID of the new object, only present if versioning has been enabled for the bucket.

Popular in Java

  • Finding current android device location
  • setScale (BigDecimal)
  • putExtra (Intent)
  • notifyDataSetChanged (ArrayAdapter)
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • RandomAccessFile (java.io)
    Allows reading from and writing to a file in a random-access manner. This is different from the uni-
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now