Skip to content

Commit 11efe92

Browse files
committed
Polish "Configure Cassandra JMX Reporting"
Closes gh-14778
1 parent d102e0d commit 11efe92

File tree

3 files changed

+9
-8
lines changed

3 files changed

+9
-8
lines changed

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public Cluster cassandraCluster() {
8383
map.from(properties::getContactPoints)
8484
.as((list) -> StringUtils.toStringArray(list))
8585
.to(builder::addContactPoints);
86-
map.from(properties::isJmxReporting).whenFalse()
86+
map.from(properties::isJmxEnabled).whenFalse()
8787
.toCall(builder::withoutJMXReporting);
8888
customize(builder);
8989
return builder.build();

spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraProperties.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -133,10 +133,10 @@ public class CassandraProperties {
133133
private boolean ssl = false;
134134

135135
/**
136-
* If JMX reporting should be enabled. Default to false as Cassandra JMX reporting is
137-
* not compatible with Dropwizrd Metrics 4.
136+
* Whether to enable JMX reporting. Default to false as Cassandra JMX reporting is not
137+
* compatible with Dropwizard Metrics.
138138
*/
139-
private boolean jmxReporting = false;
139+
private boolean jmxEnabled;
140140

141141
/**
142142
* Pool configuration.
@@ -278,12 +278,12 @@ public void setSsl(boolean ssl) {
278278
this.ssl = ssl;
279279
}
280280

281-
public boolean isJmxReporting() {
282-
return this.jmxReporting;
281+
public boolean isJmxEnabled() {
282+
return this.jmxEnabled;
283283
}
284284

285-
public void setJmxReporting(boolean jmxReporting) {
286-
this.jmxReporting = jmxReporting;
285+
public void setJmxEnabled(boolean jmxEnabled) {
286+
this.jmxEnabled = jmxEnabled;
287287
}
288288

289289
public String getSchemaAction() {

spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -637,6 +637,7 @@ content into your application. Rather, pick only the properties that you need.
637637
spring.data.cassandra.consistency-level= # Queries consistency level.
638638
spring.data.cassandra.contact-points=localhost # Cluster node addresses.
639639
spring.data.cassandra.fetch-size= # Queries default fetch size.
640+
spring.data.cassandra.jmx-enabled=false # Whether to enable JMX reporting.
640641
spring.data.cassandra.keyspace-name= # Keyspace name to use.
641642
spring.data.cassandra.port= # Port of the Cassandra server.
642643
spring.data.cassandra.password= # Login password of the server.

0 commit comments

Comments
 (0)