Remove PushRegistry's numThreads deprecated property

See gh-20835
pull/20847/head
Stephane Nicoll 5 years ago
parent a23700f323
commit 7ca6359b43

@ -49,11 +49,6 @@ public abstract class PushRegistryProperties {
*/
private Duration readTimeout = Duration.ofSeconds(10);
/**
* Number of threads to use with the metrics publishing scheduler.
*/
private Integer numThreads = 2;
/**
* Number of measurements per request to use for this backend. If more measurements
* are found, then multiple requests will be made.
@ -92,16 +87,6 @@ public abstract class PushRegistryProperties {
this.readTimeout = readTimeout;
}
@Deprecated
public Integer getNumThreads() {
return this.numThreads;
}
@Deprecated
public void setNumThreads(Integer numThreads) {
this.numThreads = numThreads;
}
public Integer getBatchSize() {
return this.batchSize;
}

@ -56,12 +56,6 @@ public abstract class PushRegistryPropertiesConfigAdapter<T extends PushRegistry
return get(T::isEnabled, PushRegistryConfig.super::enabled);
}
@Override
@SuppressWarnings("deprecation")
public int numThreads() {
return get(T::getNumThreads, PushRegistryConfig.super::numThreads);
}
@Override
public int batchSize() {
return get(T::getBatchSize, PushRegistryConfig.super::batchSize);

@ -220,10 +220,40 @@
"defaultValue": "simple"
},
{
"name": "management.metrics.export.jmx.enabled",
"type": "java.lang.Boolean",
"description": "Whether exporting of metrics to JMX is enabled.",
"defaultValue": true
"name": "management.metrics.export.appoptics.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.datadog.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.dynatrace.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.elastic.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.ganglia.addressing-mode",
@ -249,12 +279,45 @@
"name": "management.metrics.export.graphite.rate-units",
"defaultValue": "seconds"
},
{
"name": "management.metrics.export.humio.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.humio.repository",
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.influx.consistency",
"defaultValue": "one"
},
{
"name": "management.metrics.export.humio.repository",
"name": "management.metrics.export.influx.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.jmx.enabled",
"type": "java.lang.Boolean",
"description": "Whether exporting of metrics to JMX is enabled.",
"defaultValue": true
},
{
"name": "management.metrics.export.newrelic.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
@ -265,6 +328,15 @@
"description": "Whether exporting of metrics to Prometheus is enabled.",
"defaultValue": true
},
{
"name": "management.metrics.export.signalfx.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.simple.enabled",
"type": "java.lang.Boolean",
@ -275,6 +347,15 @@
"name": "management.metrics.export.simple.mode",
"defaultValue": "cumulative"
},
{
"name": "management.metrics.export.stackdriver.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.export.statsd.flavor",
"defaultValue": "datadog"
@ -286,6 +367,15 @@
"level": "error"
}
},
{
"name": "management.metrics.export.wavefront.num-threads",
"type": "java.lang.Integer",
"description": "Number of threads to use with the metrics publishing scheduler.",
"defaultValue": 2,
"deprecation": {
"level": "error"
}
},
{
"name": "management.metrics.web.client.request.autotime.enabled",
"description": "Whether to automatically time web client requests.",

@ -50,13 +50,6 @@ public abstract class PushRegistryPropertiesConfigAdapterTests<P extends PushReg
assertThat(createConfigAdapter(properties).enabled()).isFalse();
}
@Test
void whenPropertiesNumThreadsIsSetAdapterNumThreadsReturnsIt() {
P properties = createProperties();
properties.setNumThreads(42);
assertThat(createConfigAdapter(properties).numThreads()).isEqualTo(42);
}
@Test
void whenPropertiesBatchSizeIsSetAdapterBatchSizeReturnsIt() {
P properties = createProperties();

@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2012-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -33,7 +33,6 @@ public abstract class PushRegistryPropertiesTests {
assertThat(properties.isEnabled()).isEqualTo(config.enabled());
assertThat(properties.getConnectTimeout()).isEqualTo(config.connectTimeout());
assertThat(properties.getReadTimeout()).isEqualTo(config.readTimeout());
assertThat(properties.getNumThreads()).isEqualTo(config.numThreads());
assertThat(properties.getBatchSize()).isEqualTo(config.batchSize());
}

Loading…
Cancel
Save