Skip to content

Commit 486a8bd

Browse files
committed
A bit more javadoc
1 parent 454a9cc commit 486a8bd

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

libs/exponential-histogram/src/main/java/org/elasticsearch/exponentialhistogram/MergingBucketIterator.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@
99

1010
package org.elasticsearch.exponentialhistogram;
1111

12+
/**
13+
* Iterates over two sets of buckets in parallel, bringing them to the same scale
14+
* and merging buckets which exist in both.
15+
*/
1216
final class MergingBucketIterator implements ExponentialHistogram.BucketIterator {
1317

1418
private final ExponentialHistogram.BucketIterator itA;

libs/exponential-histogram/src/main/java/org/elasticsearch/exponentialhistogram/ScaleAdjustingBucketIterator.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@
1111

1212
import static org.elasticsearch.exponentialhistogram.ExponentialScaleUtils.adjustScale;
1313

14+
/**
15+
* Iterates over buckets while also adjusting the scale.
16+
* When scaling down, this can cause multiple buckets to collapse into a single one.
17+
* This iterator ensures that they are properly merged in this case.
18+
*/
1419
final class ScaleAdjustingBucketIterator implements ExponentialHistogram.BucketIterator {
1520

1621
private final ExponentialHistogram.BucketIterator delegate;

0 commit comments

Comments
 (0)