public CloudTable getHourMetricsTable ( StorageService service , StorageLocation location ) throws URISyntaxException , StorageException { Utility . assertNotNull ( "service" , service ) ; if ( location == null ) { location = StorageLocation . PRIMARY ; } switch ( service ) { case BLOB : if ( location == StorageLocation . PRIMARY ) { return this . tableClient . getTableReference ( Constants . AnalyticsConstants . METRICS_HOUR_PRIMARY_TRANSACTIONS_BLOB ) ; } else { return this . tableClient . getTableReference ( Constants . AnalyticsConstants . METRICS_HOUR_SECONDARY_TRANSACTIONS_BLOB ) ; } case FILE : if ( location == StorageLocation . PRIMARY ) { return this . tableClient . getTableReference ( Constants . AnalyticsConstants . METRICS_HOUR_PRIMARY_TRANSACTIONS_FILE ) ; } else { return this . tableClient . getTableReference ( Constants . AnalyticsConstants . METRICS_HOUR_SECONDARY_TRANSACTIONS_FILE ) ; } case QUEUE : if ( location == StorageLocation . PRIMARY ) { return this . tableClient . getTableReference ( Constants . AnalyticsConstants . METRICS_HOUR_PRIMARY_TRANSACTIONS_QUEUE ) ; } else { return this . tableClient . getTableReference ( Constants . AnalyticsConstants . METRICS_HOUR_SECONDARY_TRANSACTIONS_QUEUE ) ; } case TABLE : if ( location == StorageLocation . PRIMARY ) { return this . tableClient . getTableReference ( Constants . AnalyticsConstants . METRICS_HOUR_PRIMARY_TRANSACTIONS_TABLE ) ; } else { return this . tableClient . getTableReference ( Constants . AnalyticsConstants . METRICS_HOUR_SECONDARY_TRANSACTIONS_TABLE ) ; } default : throw new IllegalArgumentException ( SR . INVALID_STORAGE_SERVICE ) ; } }
Gets the hour metrics table for a specific storage service .