Elffuss BraidHub

kikocis/java-driver public

JAVA-805: Document that metrics are null until Cluster is initialized.
Changesetc22112a5dbd0fef5fc06eec1138b9183635b0f50726c7bd96089ee05bef63711
Authorolim7t <omichallat+github@gmail.com> · 2015-12-10 11:03 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2015-12-10 11:03 +01:00
Parents6393b4325a08

Browse the files at this changeset

3 files changed

modified changelog/README.md +1 −0
@@ -3,6 +3,7 @@
33 ### 2.0.13 (in progress)
44
55 - [bug] JAVA-994: Don't call on(Up|Down|Add|Remove) methods if Cluster is closed/closing.
6+- [improvement] JAVA-805: Document that metrics are null until Cluster is initialized.
67
78 ### 2.0.12
89
modified driver-core/src/main/java/com/datastax/driver/core/Cluster.java +2 −3
@@ -402,9 +402,8 @@
402402 /**
403403 * The cluster metrics.
404404 *
405- * @return the cluster metrics, or {@code null} if metrics collection has
406- * been disabled (that is if {@link Configuration#getMetricsOptions}
407- * returns {@code null}).
405+ * @return the cluster metrics, or {@code null} if this cluster has not yet been {@link #init() initialized}, or if
406+ * metrics collection has been disabled (that is if {@link Configuration#getMetricsOptions} returns {@code null}).
408407 */
409408 public Metrics getMetrics() {
410409 checkNotClosed(manager);
modified upgrade_guide/README.md +2 −1
@@ -54,7 +54,8 @@
5454
5555 4. The internal initialization sequence of the Cluster object has been slightly changed:
5656 some fields that were previously initialized in the constructor are now set when
57- the `init()` method is called. This is unlikely to affect regular driver users.
57+ the `init()` method is called. In particular, `Cluster#getMetrics()` will return
58+ `null` until the cluster is initialized.
5859
5960 ### 1.0 to 2.0
6061