public <T extends MetricType> void setMetricTypes(Collection<T> types) { synchronized(metricTypes) { if (types == null || types.size() == 0) { if (metricTypes.size() == 0) return; if (types == null) types = Collections.emptyList(); } metricTypes.clear(); if (!addMetricTypes(types)) { syncReadOnly(); // avoid missing sync } } } public boolean removeMetricType(MetricType type) {
MetricRegistry() { metricTypes.add(Field.ClientExecuteTime); metricTypes.add(Field.Exception); metricTypes.add(Field.ThrottleException); metricTypes.add(Field.HttpClientRetryCount); metricTypes.add(Field.HttpRequestTime); metricTypes.add(Field.RequestCount); // metricTypes.add(Field.RequestSigningTime); // metricTypes.add(Field.ResponseProcessingTime); metricTypes.add(Field.RetryCount); metricTypes.add(Field.RetryCapacityConsumed); metricTypes.add(Field.ThrottledRetryCount); metricTypes.add(Field.HttpClientSendRequestTime); metricTypes.add(Field.HttpClientReceiveResponseTime); metricTypes.add(Field.HttpSocketReadTime); metricTypes.add(Field.HttpClientPoolAvailableCount); metricTypes.add(Field.HttpClientPoolLeasedCount); metricTypes.add(Field.HttpClientPoolPendingCount); metricTypes.add(AWSServiceMetrics.HttpClientGetConnectionTime); syncReadOnly(); }
MetricRegistry() { metricTypes.add(Field.ClientExecuteTime); metricTypes.add(Field.Exception); metricTypes.add(Field.HttpClientRetryCount); metricTypes.add(Field.HttpRequestTime); metricTypes.add(Field.RequestCount); // metricTypes.add(Field.RequestSigningTime); // metricTypes.add(Field.ResponseProcessingTime); metricTypes.add(Field.RetryCount); metricTypes.add(Field.HttpClientSendRequestTime); metricTypes.add(Field.HttpClientReceiveResponseTime); metricTypes.add(Field.HttpClientPoolAvailableCount); metricTypes.add(Field.HttpClientPoolLeasedCount); metricTypes.add(Field.HttpClientPoolPendingCount); metricTypes.add(AWSServiceMetrics.HttpClientGetConnectionTime); syncReadOnly(); }
MetricRegistry() { metricTypes.add(Field.ClientExecuteTime); metricTypes.add(Field.Exception); metricTypes.add(Field.HttpClientRetryCount); metricTypes.add(Field.HttpRequestTime); metricTypes.add(Field.RequestCount); // metricTypes.add(Field.RequestSigningTime); // metricTypes.add(Field.ResponseProcessingTime); metricTypes.add(Field.RetryCount); metricTypes.add(Field.HttpClientSendRequestTime); metricTypes.add(Field.HttpClientReceiveResponseTime); metricTypes.add(Field.HttpClientPoolAvailableCount); metricTypes.add(Field.HttpClientPoolLeasedCount); metricTypes.add(Field.HttpClientPoolPendingCount); metricTypes.add(AWSServiceMetrics.HttpClientGetConnectionTime); syncReadOnly(); }
public <T extends MetricType> void setMetricTypes(Collection<T> types) { synchronized(metricTypes) { if (types == null || types.size() == 0) { if (metricTypes.size() == 0) return; if (types == null) types = Collections.emptyList(); } metricTypes.clear(); if (!addMetricTypes(types)) { syncReadOnly(); // avoid missing sync } } } public boolean removeMetricType(MetricType type) {
public <T extends MetricType> void setMetricTypes(Collection<T> types) { synchronized (metricTypes) { if (types == null || types.size() == 0) { if (metricTypes.size() == 0) return; if (types == null) types = Collections.emptyList(); } metricTypes.clear(); if (!addMetricTypes(types)) { syncReadOnly(); // avoid missing sync } } }
public <T extends MetricType> void setMetricTypes(Collection<T> types) { synchronized (metricTypes) { if (types == null || types.size() == 0) { if (metricTypes.size() == 0) return; if (types == null) types = Collections.emptyList(); } metricTypes.clear(); if (!addMetricTypes(types)) { syncReadOnly(); // avoid missing sync } } }
/** * Adds the given metric types to the REGISTRY of predefined metrics to be * captured at the AWS SDK level. * @param types the collection of metric types. * @param <T> the MetricType type. * @return true if the set of predefined metric types gets changed as a * result of the call */ public static <T extends MetricType> boolean addAll(Collection<T> types) { return types == null || types.size() == 0 ? false : REGISTRY.addMetricTypes(types); }
/** * Adds the given metric types to the REGISTRY of predefined metrics to be * captured at the AWS SDK level. * @param types the collection of metric types. * @param <T> the MetricType type. * @return true if the set of predefined metric types gets changed as a * result of the call */ public static <T extends MetricType> boolean addAll(Collection<T> types) { return types == null || types.size() == 0 ? false : REGISTRY.addMetricTypes(types); }
/** * Adds the given metric types to the registry of predefined metrics to be * captured at the AWS SDK level. * * @return true if the set of predefined metric types gets changed as a * result of the call */ public static <T extends MetricType> boolean addAll(Collection<T> types) { return types == null || types.size() == 0 ? false : registry.addMetricTypes(types); } /**
/** * Returns an unmodifiable set of the current predefined metrics. */ public static Set<MetricType> getPredefinedMetrics() { return registry.predefinedMetrics(); }
/** * Sets the given metric types to replace the registry of predefined metrics * to be captured at the AWS SDK level. */ public static <T extends MetricType> void set(Collection<T> types) { registry.setMetricTypes(types); } /**
/** * Removes the given metric type from the registry of predefined metrics to * be captured at the AWS SDK level. * * @return true if the set of predefined metric types gets changed as a * result of the call */ public static boolean remove(MetricType type) { return type == null ? false : registry.removeMetricType(type); } /**
public boolean removeMetricType(MetricType type) { synchronized (metricTypes) { boolean removed = metricTypes.remove(type); if (removed) syncReadOnly(); return removed; } }
public <T extends MetricType> boolean addMetricTypes(Collection<T> types) { synchronized(metricTypes) { boolean added = metricTypes.addAll(types); if (added) syncReadOnly(); return added; } } public <T extends MetricType> void setMetricTypes(Collection<T> types) {
/** * Adds the given metric type to the registry of predefined metrics to be * captured at the AWS SDK level. * * @return true if the set of predefined metric types gets changed as a * result of the call */ public static boolean add(MetricType type) { return type == null ? false : registry.addMetricType(type); } /**
public boolean addMetricType(MetricType type) { synchronized (metricTypes) { boolean added = metricTypes.add(type); if (added) syncReadOnly(); return added; } }
/** * Sets the given metric types to replace the REGISTRY of predefined metrics * to be captured at the AWS SDK level. * @param types the collection of metric types. * @param <T> the MetricType type. */ public static <T extends MetricType> void set(Collection<T> types) { REGISTRY.setMetricTypes(types); }
/** * Adds the given metric type to the REGISTRY of predefined metrics to be * captured at the AWS SDK level. * @param type the metric type. * @return true if the set of predefined metric types gets changed as a * result of the call */ public static boolean add(MetricType type) { return type == null ? false : REGISTRY.addMetricType(type); }
/** * Sets the given metric types to replace the REGISTRY of predefined metrics * to be captured at the AWS SDK level. * @param types the collection of metric types. * @param <T> the MetricType type. */ public static <T extends MetricType> void set(Collection<T> types) { REGISTRY.setMetricTypes(types); }