congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
MultipartUpload
Code IndexAdd Tabnine to your IDE (free)

How to use
MultipartUpload
in
org.jets3t.service.model

Best Java code snippets using org.jets3t.service.model.MultipartUpload (Showing top 20 results out of 315)

origin: net.java.dev.jets3t/jets3t

public MultipartUpload getMultipartUpload() {
  if (initiatedDate != null) {
    // Return the contents from a ListMultipartUploadsResult response
    return new MultipartUpload(uploadId, objectKey, storageClass,
      initiator, owner, initiatedDate);
  } else {
    // Return the contents from an InitiateMultipartUploadsResult response
    return new MultipartUpload(uploadId, bucketName, objectKey);
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

@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
    + "]";
}
origin: net.java.dev.jets3t/jets3t

/**
 * 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;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * 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());
}
origin: iterate-ch/cyberduck

for(MultipartUpload upload : new S3DefaultMultipartService(session).find(directory)) {
  final PathAttributes attributes = new PathAttributes();
  attributes.setVersionId(upload.getUploadId());
  attributes.setModificationDate(upload.getInitiatedDate().getTime());
  objects.add(new Path(directory, upload.getObjectKey(), EnumSet.of(Path.Type.file, Path.Type.upload), attributes));
origin: iterate-ch/cyberduck

@Override
public List<MultipartPart> list(final MultipartUpload multipart) throws BackgroundException {
  if(log.isInfoEnabled()) {
    log.info(String.format("List completed parts of %s", multipart.getUploadId()));
  }
  // This operation lists the parts that have been uploaded for a specific multipart upload.
  try {
    return session.getClient().multipartListParts(multipart);
  }
  catch(S3ServiceException e) {
    throw new S3ExceptionMappingService().map(MessageFormat.format("Upload {0} failed", multipart.getObjectKey()), e);
  }
}
origin: net.java.dev.jets3t/jets3t

/**
 * 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;
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

@Override
public void fireProgressEvent(ThreadWatcher threadWatcher, List completedResults) {
  MultipartUpload[] completedObjects = (MultipartUpload[]) completedResults
    .toArray(new MultipartUpload[completedResults.size()]);
  // Hack way to remove completed objects from incomplete list
  List<StorageObject> completedStorageObjects = new ArrayList<StorageObject>();
  for (MultipartUpload upload: completedObjects) {
    for (StorageObject object: incompletedObjectsList) {
      if (object.getKey().equals(upload.getObjectKey())) {
        completedStorageObjects.add(object);
      }
    }
  }
  incompletedObjectsList.removeAll(completedStorageObjects);
  fireServiceEvent(MultipartStartsEvent.newInProgressEvent(threadWatcher,
    completedObjects, uniqueOperationId));
}
@Override
origin: iterate-ch/cyberduck

  @Override
  public void delete(final MultipartUpload upload) throws BackgroundException {
    throw new NotfoundException(upload.getUploadId());
  }
}
origin: iterate-ch/cyberduck

  @Override
  public int compare(final MultipartUpload o1, final MultipartUpload o2) {
    return -o1.getInitiatedDate().compareTo(o2.getInitiatedDate());
  }
});
origin: net.java.dev.jets3t/jets3t

/**
 * 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());
}
origin: iterate-ch/cyberduck

if(log.isDebugEnabled()) {
  log.debug(String.format("Multipart upload started for %s with ID %s",
    multipart.getObjectKey(), multipart.getUploadId()));
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * 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;
}
origin: net.java.dev.jets3t/jets3t

@Override
public void fireProgressEvent(ThreadWatcher threadWatcher, List completedResults) {
  MultipartUpload[] completedObjects = (MultipartUpload[]) completedResults
    .toArray(new MultipartUpload[completedResults.size()]);
  // Hack way to remove completed objects from incomplete list
  List<StorageObject> completedStorageObjects = new ArrayList<StorageObject>();
  for (MultipartUpload upload: completedObjects) {
    for (StorageObject object: incompletedObjectsList) {
      if (object.getKey().equals(upload.getObjectKey())) {
        completedStorageObjects.add(object);
      }
    }
  }
  incompletedObjectsList.removeAll(completedStorageObjects);
  fireServiceEvent(MultipartStartsEvent.newInProgressEvent(threadWatcher,
    completedObjects, uniqueOperationId));
}
@Override
origin: iterate-ch/cyberduck

@Override
public MultipartPart call() throws BackgroundException {
  final Map<String, String> parameters = new HashMap<String, String>();
  parameters.put("uploadId", multipart.getUploadId());
  parameters.put("partNumber", String.valueOf(++partNumber));
  final TransferStatus status = new TransferStatus().withParameters(parameters).length(len);
origin: net.java.dev.jets3t/jets3t

List<MultipartUpload> oldMultipartUploads = new ArrayList<MultipartUpload>();
for (MultipartUpload multipartUpload: multipartUploads) {
  if (multipartUpload.getInitiatedDate().getTime() < CUTOFF) {
    oldMultipartUploads.add(multipartUpload);
origin: net.java.dev.jets3t/jets3t

@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
    + "]";
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * 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());
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.jets3t

/**
 * 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;
}
origin: iterate-ch/cyberduck

@Override
public HttpResponseOutputStream<VersionId> write(final Path file, final TransferStatus status, final ConnectionCallback callback) throws BackgroundException {
  final S3Object object = new S3WriteFeature(session, new S3DisabledMultipartService())
    .getDetails(file, status);
  // ID for the initiated multipart upload.
  final MultipartUpload multipart;
  try {
    multipart = session.getClient().multipartStartUpload(
      containerService.getContainer(file).getName(), object);
    if(log.isDebugEnabled()) {
      log.debug(String.format("Multipart upload started for %s with ID %s",
        multipart.getObjectKey(), multipart.getUploadId()));
    }
  }
  catch(ServiceException e) {
    throw new S3ExceptionMappingService().map("Upload {0} failed", e, file);
  }
  final MultipartOutputStream proxy = new MultipartOutputStream(multipart, file, status);
  return new HttpResponseOutputStream<VersionId>(new MemorySegementingOutputStream(proxy,
    preferences.getInteger("s3.upload.multipart.partsize.minimum"))) {
    @Override
    public VersionId getStatus() {
      return proxy.getVersionId();
    }
  };
}
org.jets3t.service.modelMultipartUpload

Javadoc

Represents a MultipartUpload operation.

Most used methods

  • <init>
  • getBucketName
  • getInitiatedDate
  • getObjectKey
  • getUploadId
  • addMultipartPartToUploadedList
  • getInitiator
  • getMetadata
  • getOwner
  • getStorageClass
  • setBucketName
  • setMetadata
  • setBucketName,
  • setMetadata

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (Timer)
  • notifyDataSetChanged (ArrayAdapter)
  • setRequestProperty (URLConnection)
  • ObjectMapper (com.fasterxml.jackson.databind)
    ObjectMapper provides functionality for reading and writing JSON, either to and from basic POJOs (Pl
  • BitSet (java.util)
    The BitSet class implements abit array [http://en.wikipedia.org/wiki/Bit_array]. Each element is eit
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • JFrame (javax.swing)
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top 25 Plugins for Webstorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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