Examples of TransferManager


Examples of com.amazonaws.services.s3.transfer.TransferManager

                        break;
                }
            }
        };

        TransferManager transferManager = new TransferManager(credentials);

        PutObjectRequest request = new PutObjectRequest(bucketName, warName, warFile).withProgressListener(progressListener);

        // create the bucket if it doesn't already exist
        createS3Bucket(transferManager);

        log.info("Uploading war to S3...");
        upload = transferManager.upload(request);
    }
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

    super(credentialsProvider);
    init();
  }
 
  protected void init() {
    transferManager = new TransferManager(this);
    TransferManagerConfiguration configuration = new TransferManagerConfiguration();
    configuration.setMultipartUploadThreshold(100 * Constants.KB);
    transferManager.setConfiguration(configuration);
  }
 
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

        public PrestoS3OutputStream(AmazonS3 s3, TransferManagerConfiguration config, String host, String key, File tempFile)
                throws IOException
        {
            super(new BufferedOutputStream(new FileOutputStream(checkNotNull(tempFile, "tempFile is null"))));

            transferManager = new TransferManager(checkNotNull(s3, "s3 is null"));
            transferManager.setConfiguration(checkNotNull(config, "config is null"));

            this.host = checkNotNull(host, "host is null");
            this.key = checkNotNull(key, "key is null");
            this.tempFile = tempFile;
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

        if (LOGGER.isDebugEnabled()) {
            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();
    }
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

        if (LOGGER.isDebugEnabled()) {
            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();
    }
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

        assert req != null;

        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();

    }
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

     */
    public void useClient(AmazonS3Client client) {
        Region s3region = client.getRegion();

        synchronized (transferManagersByRegion) {
            TransferManager tm = transferManagersByRegion.remove(s3region);
            if (tm != null) {
                tm.shutdownNow();
            }
            clientsByRegion.put(s3region, client);
        }
    }
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

     *         instantiated automatically from any existing
     *         {@link AmazonS3Client},
     */
    public TransferManager getTransferManager(Region region) {
        synchronized (transferManagersByRegion) {
            TransferManager tm = transferManagersByRegion.get(region);
            if (tm == null) {
                tm = new TransferManager(getClient(region));
                transferManagersByRegion.put(region, tm);
            }
            return tm;
        }
    }
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

    super(credentialsProvider);
    init();
  }
 
  protected void init() {
    transferManager = new TransferManager(this);
    TransferManagerConfiguration configuration = new TransferManagerConfiguration();
    configuration.setMultipartUploadThreshold(100 * Constants.KB);
    transferManager.setConfiguration(configuration);
  }
 
View Full Code Here

Examples of com.amazonaws.services.s3.transfer.TransferManager

        credentials = new PropertiesCredentials(S3TransferProgressSample.class
                .getResourceAsStream("AwsCredentials.properties"));

        // TransferManager manages a pool of threads, so we create a
        // single instance and share it throughout our application.
        tx = new TransferManager(credentials);
       
        bucketName = "s3-upload-sdk-sample-" + credentials.getAWSAccessKeyId().toLowerCase();
       
        new S3TransferProgressSample();
    }
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.