Browse Source

Polish "Configure Cassandra JMX Reporting"

Closes gh-14778
pull/14744/merge
Stephane Nicoll 8 years ago
parent
commit
11efe92ce7
  1. 2
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraAutoConfiguration.java
  2. 14
      spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cassandra/CassandraProperties.java
  3. 1
      spring-boot-project/spring-boot-docs/src/main/asciidoc/appendix-application-properties.adoc

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

@ -83,7 +83,7 @@ public class CassandraAutoConfiguration { @@ -83,7 +83,7 @@ public class CassandraAutoConfiguration {
map.from(properties::getContactPoints)
.as((list) -> StringUtils.toStringArray(list))
.to(builder::addContactPoints);
map.from(properties::isJmxReporting).whenFalse()
map.from(properties::isJmxEnabled).whenFalse()
.toCall(builder::withoutJMXReporting);
customize(builder);
return builder.build();

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

@ -133,10 +133,10 @@ public class CassandraProperties { @@ -133,10 +133,10 @@ public class CassandraProperties {
private boolean ssl = false;
/**
* If JMX reporting should be enabled. Default to false as Cassandra JMX reporting is
* not compatible with Dropwizrd Metrics 4.
* Whether to enable JMX reporting. Default to false as Cassandra JMX reporting is not
* compatible with Dropwizard Metrics.
*/
private boolean jmxReporting = false;
private boolean jmxEnabled;
/**
* Pool configuration.
@ -278,12 +278,12 @@ public class CassandraProperties { @@ -278,12 +278,12 @@ public class CassandraProperties {
this.ssl = ssl;
}
public boolean isJmxReporting() {
return this.jmxReporting;
public boolean isJmxEnabled() {
return this.jmxEnabled;
}
public void setJmxReporting(boolean jmxReporting) {
this.jmxReporting = jmxReporting;
public void setJmxEnabled(boolean jmxEnabled) {
this.jmxEnabled = jmxEnabled;
}
public String getSchemaAction() {

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

@ -637,6 +637,7 @@ content into your application. Rather, pick only the properties that you need. @@ -637,6 +637,7 @@ content into your application. Rather, pick only the properties that you need.
spring.data.cassandra.consistency-level= # Queries consistency level.
spring.data.cassandra.contact-points=localhost # Cluster node addresses.
spring.data.cassandra.fetch-size= # Queries default fetch size.
spring.data.cassandra.jmx-enabled=false # Whether to enable JMX reporting.
spring.data.cassandra.keyspace-name= # Keyspace name to use.
spring.data.cassandra.port= # Port of the Cassandra server.
spring.data.cassandra.password= # Login password of the server.

Loading…
Cancel
Save