|Modifier and Type||Method and Description|
Sets the time interval over which samples are recorded.
Sets the minimum number of values that must be recorded for a host before we consider the sample size significant.
Sets the number of distinct hosts that the driver will ever connect to.
Sets the number of significant decimal digits to which histograms will maintain value resolution and separation.
public PerHostPercentileTracker.Builder withNumberOfSignificantValueDigits(int numberOfSignificantValueDigits)
If not set explicitly, this value defaults to 3.
See the HdrHistogram Javadocs for a more detailed explanation on how this parameter affects the resolution of recorded samples.
numberOfSignificantValueDigits- the new value.
public PerHostPercentileTracker.Builder withMinRecordedValues(int minRecordedValues)
If this count is not reached during a given interval,
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)
This parameter is only used to pre-size internal maps in order to avoid unnecessary rehashing.
If not set explicitly, this value defaults to 16.
numberOfHosts- the new value.
public PerHostPercentileTracker.Builder withInterval(long interval, TimeUnit unit)
For each host, there is a "live" histogram where current latencies are recorded, and a "cached", read-only histogram
that is used when clients call
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()
PerHostPercentileTrackerinstance configured with this builder.
Copyright © 2012–2015. All rights reserved.