Merge pull request #208 from rmuir/disable_response_metadata_cache

Disable response metadata cache.
This commit is contained in:
Robert Muir 2015-05-11 08:54:07 -04:00
commit ae323a4742
4 changed files with 27 additions and 1 deletions

View File

@ -32,7 +32,7 @@
</parent>
<properties>
<amazonaws.version>1.9.23</amazonaws.version>
<amazonaws.version>1.9.34</amazonaws.version>
</properties>
<dependencies>

View File

@ -62,6 +62,9 @@ public class AwsEc2Service extends AbstractLifecycleComponent<AwsEc2Service> {
}
ClientConfiguration clientConfiguration = new ClientConfiguration();
// the response metadata cache is only there for diagnostics purposes,
// but can force objects from every response to the old generation.
clientConfiguration.setResponseMetadataCacheSize(0);
String protocol = settings.get("cloud.aws.protocol", "https").toLowerCase();
protocol = settings.get("cloud.aws.ec2.protocol", protocol).toLowerCase();
if ("http".equals(protocol)) {

View File

@ -89,6 +89,9 @@ public class InternalAwsS3Service extends AbstractLifecycleComponent<AwsS3Servic
}
ClientConfiguration clientConfiguration = new ClientConfiguration();
// the response metadata cache is only there for diagnostics purposes,
// but can force objects from every response to the old generation.
clientConfiguration.setResponseMetadataCacheSize(0);
if (protocol == null) {
protocol = settings.get("cloud.aws.protocol", "https").toLowerCase();
protocol = settings.get("cloud.aws.s3.protocol", protocol).toLowerCase();

View File

@ -257,6 +257,26 @@ public class AmazonS3Wrapper implements AmazonS3 {
delegate.deleteBucket(bucketName);
}
@Override
public void setBucketReplicationConfiguration(String bucketName, BucketReplicationConfiguration configuration) throws AmazonServiceException, AmazonClientException {
delegate.setBucketReplicationConfiguration(bucketName, configuration);
}
@Override
public void setBucketReplicationConfiguration(SetBucketReplicationConfigurationRequest setBucketReplicationConfigurationRequest) throws AmazonServiceException, AmazonClientException {
delegate.setBucketReplicationConfiguration(setBucketReplicationConfigurationRequest);
}
@Override
public BucketReplicationConfiguration getBucketReplicationConfiguration(String bucketName) throws AmazonServiceException, AmazonClientException {
return delegate.getBucketReplicationConfiguration(bucketName);
}
@Override
public void deleteBucketReplicationConfiguration(String bucketName) throws AmazonServiceException, AmazonClientException {
delegate.deleteBucketReplicationConfiguration(bucketName);
}
@Override
public PutObjectResult putObject(PutObjectRequest putObjectRequest) throws AmazonClientException, AmazonServiceException {
return delegate.putObject(putObjectRequest);