Package com.amazonaws.services.s3.transfer

Examples of com.amazonaws.services.s3.transfer.Copy.waitForCompletion()


            LOGGER.debug(format("Multipart sending file %1$s as S3 object %2$s in "
                    + "bucket %3$s", sourceFile.getName(), key, bucketName));
        }
        TransferManager tm = new TransferManager(S3Utils.acquireClient(clientOptions));
        Upload upload = tm.upload(bucketName, key, sourceFile);
        upload.waitForCompletion();
    }

    // multi-part upload object
    public static void mputObject(final ClientOptions clientOptions,
            final InputStream sourceStream, final String bucketName, final String key) throws InterruptedException {
View Full Code Here


            LOGGER.debug(format("Multipart sending stream as S3 object %1$s in "
                    + "bucket %2$s", key, bucketName));
        }
        TransferManager tm = new TransferManager(S3Utils.acquireClient(clientOptions));
        Upload upload = tm.upload(bucketName, key, sourceStream, null);
        upload.waitForCompletion();
    }

    // multi-part upload object
    public static void mputObject(final ClientOptions clientOptions,
            final PutObjectRequest req) throws InterruptedException {
View Full Code Here

        if (LOGGER.isDebugEnabled()) {
            LOGGER.debug("Multipart sending object to S3 using PutObjectRequest");
        }      
        TransferManager tm = new TransferManager(S3Utils.acquireClient(clientOptions));
        Upload upload = tm.upload(req);
        upload.waitForCompletion();

    }
   
    public static void setObjectAcl(final ClientOptions clientOptions, final String bucketName, final String key,
            final CannedAccessControlList acl) {
View Full Code Here

                   }
          final InputStream instr = content.getInputStream();
          try {
            final Upload upload = getTransferManager().upload(
              destFile.getBucket().getName(), destFile.objectKey, instr, md);
            upload.waitForCompletion();
          } finally {
            instr.close();
          }
        } else {
            // nothing useful to do if no content and can't have children
View Full Code Here

                        if (progressEvent.getEventCode() == COMPLETED_EVENT_CODE) {
                            logger.info("File " + objectKey + " was successfully uploaded to " + getBucket().getName());
                        }
                    }
                });
                upload.waitForCompletion();
                doDetach();
                doAttach();
            } catch (AmazonServiceException e) {
                throw new IOException(e);
            } catch (InterruptedException e) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.