Skip to content

Commit 5781cb4

Browse files
committed
Merge remote-tracking branch 'oss/3.0.x' into 3.1.x
2 parents 115573b + cc67382 commit 5781cb4

2 files changed

Lines changed: 10 additions & 26 deletions

File tree

driver-core/src/main/java/com/datastax/driver/core/policies/LatencyAwarePolicy.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -589,18 +589,16 @@ public Builder withExclusionThreshold(double exclusionThreshold) {
589589
* Sets the scale to use for the resulting latency aware policy.
590590
* <p/>
591591
* The {@code scale} provides control on how the weight given to older latencies
592-
* decreases over time. For a given host, if a new latency \(l\) is received at
593-
* time \(t\), and the previously calculated average is \(prev\) calculated at
594-
* time \(t'\), then the newly calculated average \(avg\) for that host is calculated
592+
* decreases over time. For a given host, if a new latency {@code l} is received at
593+
* time {@code t}, and the previously calculated average is {@code prev} calculated at
594+
* time {@code t'}, then the newly calculated average {@code avg} for that host is calculated
595595
* thusly:
596-
* \[
597-
* d = \frac{t - t'}{scale} \\
598-
* \alpha = 1 - \left(\frac{\ln(d+1)}{d}\right) \\
599-
* avg = \alpha * l + (1-\alpha) * prev
600-
* \]
596+
* <pre>{@code d = (t - t') / scale
597+
* alpha = 1 - (ln(d+1) / d)
598+
* avg = alpha * l + (1 - alpha * prev)}</pre>
601599
* Typically, with a {@code scale} of 100 milliseconds (the default), if a new
602-
* latency is measured and the previous measure is 10 millisecond old (so \(d=0.1\)),
603-
* then \(\alpha\) will be around \(0.05\). In other words, the new latency will
600+
* latency is measured and the previous measure is 10 millisecond old (so {@code d=0.1}),
601+
* then {@code alpha} will be around {@code 0.05}. In other words, the new latency will
604602
* weight 5% of the updated average. A bigger scale will get less weight to new
605603
* measurements (compared to previous ones), a smaller one will give them more weight.
606604
* <p/>
@@ -612,7 +610,7 @@ public Builder withExclusionThreshold(double exclusionThreshold) {
612610
* @param scale the scale to use.
613611
* @param unit the unit of {@code scale}.
614612
* @return this builder.
615-
* @throws IllegalArgumentException if {@code scale &lte; 0}.
613+
* @throws IllegalArgumentException if {@code scale <= 0}.
616614
*/
617615
public Builder withScale(long scale, TimeUnit unit) {
618616
if (scale <= 0)

pom.xml

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -230,23 +230,9 @@
230230
<configuration>
231231
<verbose>false</verbose>
232232
<additionalparam>${javadoc.opts}</additionalparam>
233-
<!-- I can haz math in my javadoc (see http://zverovich.net/2012/01/14/beautiful-math-in-javadoc.html) -->
234-
<header>
235-
&lt;script type="text/javascript"
236-
src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML"&gt;&lt;/script&gt;
237-
</header>
238-
<!-- open external links in a separate window -->
239-
<bottom>
240-
&lt;script type="text/javascript"&gt;
241-
for(var i in document.links) {
242-
var link = document.links[i];
243-
if (link.href.indexOf('is-external=true') != -1) link.target = '_blank';
244-
}
245-
&lt;/script&gt;
246-
</bottom>
247233
<links>
248234
<link>https://docs.oracle.com/javase/8/docs/api/</link>
249-
<link>http://docs.guava-libraries.googlecode.com/git-history/v16.0.1/javadoc/</link>
235+
<link>http://google.github.io/guava/releases/16.0.1/api/docs/</link>
250236
<link>http://netty.io/4.0/api/</link>
251237
<!-- dependencies from driver-extras -->
252238
<link>http://www.joda.org/joda-time/apidocs/</link>

0 commit comments

Comments
 (0)