Java 类com.amazonaws.services.s3.model.BucketReplicationConfiguration 实例源码

项目:ibm-cos-sdk-java    文件:BucketConfigurationXmlFactory.java   
public byte[] convertToXmlByteArray(BucketReplicationConfiguration replicationConfiguration) {
    XmlWriter xml = new XmlWriter();
    xml.start("ReplicationConfiguration");
    Map<String, ReplicationRule> rules = replicationConfiguration
            .getRules();

    final String role = replicationConfiguration.getRoleARN();
    xml.start("Role").value(role).end();
    for (Map.Entry<String, ReplicationRule> entry : rules
            .entrySet()) {
        final String ruleId = entry.getKey();
        final ReplicationRule rule = entry.getValue();

        xml.start("Rule");
        xml.start("ID").value(ruleId).end();
        xml.start("Prefix").value(rule.getPrefix()).end();
        xml.start("Status").value(rule.getStatus()).end();

        final ReplicationDestinationConfig config = rule.getDestinationConfig();
        xml.start("Destination");
        xml.start("Bucket").value(config.getBucketARN()).end();
        if (config.getStorageClass() != null) {
            xml.start("StorageClass").value(config.getStorageClass()).end();
        }
        xml.end();

        xml.end();
    }
    xml.end();
    return xml.getBytes();
}
项目:elasticsearch_my    文件:AmazonS3Wrapper.java   
@Override
public void setBucketReplicationConfiguration(String bucketName, BucketReplicationConfiguration configuration) throws AmazonServiceException, AmazonClientException {
    delegate.setBucketReplicationConfiguration(bucketName, configuration);
}
项目:elasticsearch_my    文件:AmazonS3Wrapper.java   
@Override
public BucketReplicationConfiguration getBucketReplicationConfiguration(String bucketName) throws AmazonServiceException, AmazonClientException {
    return delegate.getBucketReplicationConfiguration(bucketName);
}
项目:elasticsearch_my    文件:AmazonS3Wrapper.java   
@Override
public BucketReplicationConfiguration getBucketReplicationConfiguration(GetBucketReplicationConfigurationRequest getBucketReplicationConfigurationRequest) throws AmazonServiceException, AmazonClientException {
    return delegate.getBucketReplicationConfiguration(getBucketReplicationConfigurationRequest);
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public void setBucketReplicationConfiguration(String bucketName, BucketReplicationConfiguration configuration) throws AmazonServiceException, AmazonServiceException {
  run(() -> getDelegate().setBucketReplicationConfiguration(bucketName, configuration));
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public BucketReplicationConfiguration getBucketReplicationConfiguration(String bucketName) throws AmazonServiceException, AmazonServiceException {
  return call(() -> getDelegate().getBucketReplicationConfiguration(bucketName));
}
项目:S3Decorators    文件:S3Decorator.java   
@Override
public BucketReplicationConfiguration getBucketReplicationConfiguration(GetBucketReplicationConfigurationRequest getBucketReplicationConfigurationRequest) throws AmazonServiceException, AmazonServiceException {
  return call(() -> getDelegate().getBucketReplicationConfiguration(getBucketReplicationConfigurationRequest));
}
项目:presto    文件:MockAmazonS3.java   
@Override
public void setBucketReplicationConfiguration(String bucketName, BucketReplicationConfiguration bucketReplicationConfiguration)
        throws AmazonClientException
{
}
项目:presto    文件:MockAmazonS3.java   
@Override
public BucketReplicationConfiguration getBucketReplicationConfiguration(String bucketName)
        throws AmazonClientException
{
    return null;
}