public static class PerHostPercentileTracker.Builder extends Object
PerHostPercentileTracker
instances with a fluent interface.Modifier and Type | Method and Description |
---|---|
PerHostPercentileTracker |
build()
Builds the
PerHostPercentileTracker instance configured with this builder. |
PerHostPercentileTracker.Builder |
withInterval(long interval,
TimeUnit unit)
Sets the time interval over which samples are recorded.
|
PerHostPercentileTracker.Builder |
withMinRecordedValues(int minRecordedValues)
Sets the minimum number of values that must be recorded for a host before we consider
the sample size significant.
|
PerHostPercentileTracker.Builder |
withNumberOfHosts(int numberOfHosts)
Sets the number of distinct hosts that the driver will ever connect to.
|
PerHostPercentileTracker.Builder |
withNumberOfSignificantValueDigits(int numberOfSignificantValueDigits)
Sets the number of significant decimal digits to which histograms will maintain value
resolution and separation.
|
public PerHostPercentileTracker.Builder withNumberOfSignificantValueDigits(int numberOfSignificantValueDigits)
numberOfSignificantValueDigits
- the new value.public PerHostPercentileTracker.Builder withMinRecordedValues(int minRecordedValues)
PerHostPercentileTracker.getLatencyAtPercentile(Host, double)
will return a negative value, indicating that statistics are not available. In particular, this is true
during the first interval.
If not set explicitly, this value default to 1000.minRecordedValues
- the new value.public PerHostPercentileTracker.Builder withNumberOfHosts(int numberOfHosts)
numberOfHosts
- the new value.public PerHostPercentileTracker.Builder withInterval(long interval, TimeUnit unit)
PerHostPercentileTracker.getLatencyAtPercentile(Host, double)
. Each time the cached histogram becomes
older than the interval, the two histograms are switched. Note that statistics will not be available during the first
interval at cluster startup, since we don't have a cached histogram yet.
If not set explicitly, this value defaults to 5 minutes.interval
- the new interval.unit
- the unit that the interval is expressed in.public PerHostPercentileTracker build()
PerHostPercentileTracker
instance configured with this builder.