private long getTotalBytes ( String bucketName , AmazonCloudWatch client ) { long totalBytes = 0 ; totalBytes += getMetricData ( bucketName , "BucketSizeBytes" , "StandardStorage" , client ) ; totalBytes += getMetricData ( bucketName , "BucketSizeBytes" , "StandardIAStorage" , client ) ; totalBytes += getMetricData ( bucketName , "BucketSizeBytes" , "ReducedRedundancyStorage" , client ) ; return totalBytes ; }
Gets the total byte count for all storage types and combines them to produce a single stored bytes value