/** * Gets the hour metrics properties. * * @return A {@link MetricsProperties} object which represents the hour metrics properties. */ public MetricsProperties getHourMetrics() { return this.serviceProperties.getHourMetrics(); }
/** * Gets the hour metrics properties. * * @return A {@link MetricsProperties} object which represents the hour metrics properties. */ public MetricsProperties getHourMetrics() { return this.serviceProperties.getHourMetrics(); }
this.props.getHourMetrics().setRetentionIntervalInDays(this.retentionPolicyDays); MetricsProperties metrics = this.props.getHourMetrics(); if (Constants.AnalyticsConstants.VERSION_ELEMENT.equals(currentNode)) { metrics.setVersion(value);
this.props.getHourMetrics().setRetentionIntervalInDays(this.retentionPolicyDays); MetricsProperties metrics = this.props.getHourMetrics(); if (Constants.AnalyticsConstants.VERSION_ELEMENT.equals(currentNode)) { metrics.setVersion(value);
if (properties.getHourMetrics() != null) { writeMetricsProperties(xmlw, properties.getHourMetrics(), Constants.AnalyticsConstants.HOUR_METRICS_ELEMENT);
if (properties.getHourMetrics() != null) { writeMetricsProperties(xmlw, properties.getHourMetrics(), Constants.AnalyticsConstants.HOUR_METRICS_ELEMENT);
private void testAnalyticsDisable(ServiceClient client, ServiceProperties props) throws StorageException, InterruptedException { props.getLogging().setLogOperationTypes(EnumSet.noneOf(LoggingOperations.class)); props.getLogging().setRetentionIntervalInDays(null); props.getLogging().setVersion("1.0"); props.getHourMetrics().setMetricsLevel(MetricsLevel.DISABLED); props.getHourMetrics().setRetentionIntervalInDays(null); props.getHourMetrics().setVersion("1.0"); props.getMinuteMetrics().setMetricsLevel(MetricsLevel.DISABLED); props.getMinuteMetrics().setRetentionIntervalInDays(null); props.getMinuteMetrics().setVersion("1.0"); props.getCors().getCorsRules().clear(); callUploadServiceProps(client, props, null); assertServicePropertiesAreEqual(props, callDownloadServiceProperties(client)); }
props.getHourMetrics().setMetricsLevel(MetricsLevel.SERVICE); props.getHourMetrics().setRetentionIntervalInDays(6); props.getHourMetrics().setVersion("1.0"); newProps.setHourMetrics(props.getHourMetrics()); newProps.setMinuteMetrics(props.getMinuteMetrics()); newProps.setCors(null);
private void testAnalyticsRetentionPolicies(ServiceClient client, ServiceProperties props) throws StorageException, InterruptedException { props.getHourMetrics().setMetricsLevel(MetricsLevel.DISABLED); props.getHourMetrics().setRetentionIntervalInDays(null); props.getMinuteMetrics().setMetricsLevel(MetricsLevel.DISABLED); props.getMinuteMetrics().setRetentionIntervalInDays(null); props.getHourMetrics().setRetentionIntervalInDays(1); props.getHourMetrics().setMetricsLevel(MetricsLevel.SERVICE); props.getMinuteMetrics().setRetentionIntervalInDays(1); props.getMinuteMetrics().setMetricsLevel(MetricsLevel.SERVICE); props.getHourMetrics().setRetentionIntervalInDays(2); props.getHourMetrics().setMetricsLevel(MetricsLevel.SERVICE_AND_API); props.getMinuteMetrics().setRetentionIntervalInDays(2); props.getMinuteMetrics().setMetricsLevel(MetricsLevel.SERVICE_AND_API);
if (propsA.getHourMetrics() != null && propsB.getHourMetrics() != null) { assertTrue(propsA.getHourMetrics().getMetricsLevel().equals(propsB.getHourMetrics().getMetricsLevel())); assertEquals(propsA.getHourMetrics().getRetentionIntervalInDays(), propsB.getHourMetrics() .getRetentionIntervalInDays()); assertEquals(propsA.getHourMetrics().getVersion(), propsB.getHourMetrics().getVersion()); assertNull(propsA.getHourMetrics()); assertNull(propsB.getHourMetrics());
throws StorageException, InterruptedException { final MetricsProperties hours = (props == null) ? fileProps.getHourMetrics() : props.getHourMetrics();