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 {
map.from(properties::getContactPoints) map.from(properties::getContactPoints)
.as((list) -> StringUtils.toStringArray(list)) .as((list) -> StringUtils.toStringArray(list))
.to(builder::addContactPoints); .to(builder::addContactPoints);
map.from(properties::isJmxReporting).whenFalse() map.from(properties::isJmxEnabled).whenFalse()
.toCall(builder::withoutJMXReporting); .toCall(builder::withoutJMXReporting);
customize(builder); customize(builder);
return builder.build(); 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 {
private boolean ssl = false; private boolean ssl = false;
/** /**
* If JMX reporting should be enabled. Default to false as Cassandra JMX reporting is * Whether to enable JMX reporting. Default to false as Cassandra JMX reporting is not
* not compatible with Dropwizrd Metrics 4. * compatible with Dropwizard Metrics.
*/ */
private boolean jmxReporting = false; private boolean jmxEnabled;
/** /**
* Pool configuration. * Pool configuration.
@ -278,12 +278,12 @@ public class CassandraProperties {
this.ssl = ssl; this.ssl = ssl;
} }
public boolean isJmxReporting() { public boolean isJmxEnabled() {
return this.jmxReporting; return this.jmxEnabled;
} }
public void setJmxReporting(boolean jmxReporting) { public void setJmxEnabled(boolean jmxEnabled) {
this.jmxReporting = jmxReporting; this.jmxEnabled = jmxEnabled;
} }
public String getSchemaAction() { 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.
spring.data.cassandra.consistency-level= # Queries consistency level. spring.data.cassandra.consistency-level= # Queries consistency level.
spring.data.cassandra.contact-points=localhost # Cluster node addresses. spring.data.cassandra.contact-points=localhost # Cluster node addresses.
spring.data.cassandra.fetch-size= # Queries default fetch size. 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.keyspace-name= # Keyspace name to use.
spring.data.cassandra.port= # Port of the Cassandra server. spring.data.cassandra.port= # Port of the Cassandra server.
spring.data.cassandra.password= # Login password of the server. spring.data.cassandra.password= # Login password of the server.

Loading…
Cancel
Save