Skip to content

Commit 1269ca9

Browse files
committed
Add deprecation for WavefrontMetricsProperties.get/setBatchSize
See spring-projectsgh-30156
1 parent 72c4da0 commit 1269ca9

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

spring-boot-project/spring-boot-actuator-autoconfigure/src/main/java/org/springframework/boot/actuate/autoconfigure/metrics/export/wavefront/WavefrontMetricsProperties.java

+18
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
package org.springframework.boot.actuate.autoconfigure.metrics.export.wavefront;
1818

1919
import org.springframework.boot.actuate.autoconfigure.metrics.export.properties.PushRegistryProperties;
20+
import org.springframework.boot.actuate.autoconfigure.wavefront.WavefrontProperties.Sender;
2021
import org.springframework.boot.context.properties.ConfigurationProperties;
2122

2223
/**
@@ -46,4 +47,21 @@ public void setGlobalPrefix(String globalPrefix) {
4647
this.globalPrefix = globalPrefix;
4748
}
4849

50+
/**
51+
* @deprecated use {@link Sender#getBatchSize()}
52+
*/
53+
@Override
54+
@Deprecated
55+
public Integer getBatchSize() {
56+
return super.getBatchSize();
57+
}
58+
59+
/**
60+
* @deprecated use {@link Sender#setBatchSize(int)}}
61+
*/
62+
@Override
63+
@Deprecated
64+
public void setBatchSize(Integer batchSize) {
65+
super.setBatchSize(batchSize);
66+
}
4967
}

spring-boot-project/spring-boot-actuator-autoconfigure/src/test/java/org/springframework/boot/actuate/autoconfigure/metrics/export/wavefront/WavefrontMetricsPropertiesTests.java

-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ void defaultValuesAreConsistent() {
3737
WavefrontConfig config = WavefrontConfig.DEFAULT_DIRECT;
3838
assertStepRegistryDefaultValues(properties, config);
3939
assertThat(properties.getStep()).isEqualTo(config.step());
40-
assertThat(properties.getBatchSize()).isEqualTo(config.batchSize());
4140
assertThat(properties.getGlobalPrefix()).isEqualTo(config.globalPrefix());
4241
}
4342

0 commit comments

Comments
 (0)