use of com.talend.shaded.com.amazonaws.services.s3.AmazonS3Client in project exhibitor by soabase.
the class S3ClientImpl method completeMultipartUpload.
@Override
public void completeMultipartUpload(CompleteMultipartUploadRequest request) throws Exception {
RefCountedClient holder = client.get();
AmazonS3Client amazonS3Client = holder.useClient();
try {
amazonS3Client.completeMultipartUpload(request);
} finally {
holder.release();
}
}
use of com.talend.shaded.com.amazonaws.services.s3.AmazonS3Client in project exhibitor by soabase.
the class S3ClientImpl method abortMultipartUpload.
@Override
public void abortMultipartUpload(AbortMultipartUploadRequest request) throws Exception {
RefCountedClient holder = client.get();
AmazonS3Client amazonS3Client = holder.useClient();
try {
amazonS3Client.abortMultipartUpload(request);
} finally {
holder.release();
}
}
use of com.talend.shaded.com.amazonaws.services.s3.AmazonS3Client in project exhibitor by soabase.
the class S3ClientImpl method getObject.
@Override
public S3Object getObject(String bucket, String key) throws Exception {
RefCountedClient holder = client.get();
AmazonS3Client amazonS3Client = holder.useClient();
try {
return amazonS3Client.getObject(bucket, key);
} finally {
holder.release();
}
}
use of com.talend.shaded.com.amazonaws.services.s3.AmazonS3Client in project exhibitor by soabase.
the class S3ClientImpl method createClient.
private AmazonS3Client createClient(AWSCredentialsProvider awsCredentialProvider, BasicAWSCredentials basicAWSCredentials, S3ClientConfig clientConfig) {
AmazonS3Client localClient;
if (awsCredentialProvider != null) {
if (clientConfig != null) {
localClient = new AmazonS3Client(awsCredentialProvider, clientConfig.getAWSClientConfig());
} else {
localClient = new AmazonS3Client(awsCredentialProvider);
}
} else if (basicAWSCredentials != null) {
if (clientConfig != null) {
localClient = new AmazonS3Client(basicAWSCredentials, clientConfig.getAWSClientConfig());
} else {
localClient = new AmazonS3Client(basicAWSCredentials);
}
} else {
if (clientConfig != null) {
localClient = new AmazonS3Client(clientConfig.getAWSClientConfig());
} else {
localClient = new AmazonS3Client();
}
}
if (s3Region != null) {
String fixedRegion = s3Region.equals("us-east-1") ? "" : ("-" + s3Region);
String endpoint = ENDPOINT_SPEC.replace("$REGION$", fixedRegion);
localClient.setEndpoint(endpoint);
log.info("Setting S3 endpoint to: " + endpoint);
}
return localClient;
}
use of com.talend.shaded.com.amazonaws.services.s3.AmazonS3Client in project exhibitor by soabase.
the class S3ClientImpl method putObject.
@Override
public PutObjectResult putObject(PutObjectRequest request) throws Exception {
RefCountedClient holder = client.get();
AmazonS3Client amazonS3Client = holder.useClient();
try {
return amazonS3Client.putObject(request);
} finally {
holder.release();
}
}
Aggregations