B
- the type of the concrete builder implementation.T
- the type of the object to build.public abstract static class PercentileTracker.Builder<B,T> extends Object
PercentileTracker
implementation builders.Modifier and Type | Field and Description |
---|---|
protected long |
highestTrackableLatencyMillis |
protected long |
intervalMs |
protected int |
minRecordedValues |
protected int |
numberOfSignificantValueDigits |
Modifier and Type | Method and Description |
---|---|
abstract T |
build()
Builds the
PercentileTracker instance configured with this builder. |
protected abstract B |
self() |
B |
withInterval(long interval,
TimeUnit unit)
Sets the time interval over which samples are recorded.
|
B |
withMinRecordedValues(int minRecordedValues)
Sets the minimum number of values that must be recorded for a host before we consider
the sample size significant.
|
B |
withNumberOfSignificantValueDigits(int numberOfSignificantValueDigits)
Sets the number of significant decimal digits to which histograms will maintain value
resolution and separation.
|
protected final long highestTrackableLatencyMillis
protected int numberOfSignificantValueDigits
protected int minRecordedValues
protected long intervalMs
protected abstract B self()
public B withNumberOfSignificantValueDigits(int numberOfSignificantValueDigits)
numberOfSignificantValueDigits
- the new value.public B withMinRecordedValues(int minRecordedValues)
PercentileTracker.getLatencyAtPercentile(Host, Statement, Exception, 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 B withInterval(long interval, TimeUnit unit)
PercentileTracker.getLatencyAtPercentile(Host, Statement, Exception, 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 abstract T build()
PercentileTracker
instance configured with this builder.Copyright © 2012–2018. All rights reserved.