public interface IntervalHistogramProvider<T extends EncodableHistogram>
| Modifier and Type | Method and Description |
|---|---|
T |
getIntervalHistogram()
Get a new instance of an interval histogram, which will include a stable, consistent view of all value
counts accumulated since the last interval histogram was taken.
|
T |
getIntervalHistogram(T histogramToRecycle)
Get an interval histogram, which will include a stable, consistent view of all value counts
accumulated since the last interval histogram was taken.
|
T |
getIntervalHistogram(T histogramToRecycle,
boolean enforceContainingInstance)
Get an interval histogram, which will include a stable, consistent view of all value counts
accumulated since the last interval histogram was taken.
|
void |
getIntervalHistogramInto(T targetHistogram)
Place a copy of the value counts accumulated since accumulated (since the last interval histogram
was taken) into
targetHistogram. |
T getIntervalHistogram()
Calling this will reset the value counts, and start accumulating value counts for the next interval.
T getIntervalHistogram(T histogramToRecycle)
getIntervalHistogram(histogramToRecycle)
accepts a previously returned interval histogram that can be recycled internally to avoid allocation
and content copying operations, and is therefore significantly more efficient for repeated use than
getIntervalHistogram() and
getIntervalHistogramInto(). The provided
histogramToRecycle must
be either be null or an interval histogram returned by a previous call to
getIntervalHistogram(histogramToRecycle) or
getIntervalHistogram().
NOTE: The caller is responsible for not recycling the same returned interval histogram more than once. If the same interval histogram instance is recycled more than once, behavior is undefined.
Calling getIntervalHistogram(histogramToRecycle) will reset the value counts, and start accumulating value
counts for the next interval
histogramToRecycle - a previously returned interval histogram that may be recycled to avoid allocation and
copy operations.T getIntervalHistogram(T histogramToRecycle, boolean enforceContainingInstance)
getIntervalHistogram(histogramToRecycle)
accepts a previously returned interval histogram that can be recycled internally to avoid allocation
and content copying operations, and is therefore significantly more efficient for repeated use than
getIntervalHistogram() and
getIntervalHistogramInto(). The provided
histogramToRecycle must
be either be null or an interval histogram returned by a previous call to
getIntervalHistogram(histogramToRecycle) or
getIntervalHistogram().
NOTE: The caller is responsible for not recycling the same returned interval histogram more than once. If the same interval histogram instance is recycled more than once, behavior is undefined.
Calling getIntervalHistogram(histogramToRecycle) will reset the value counts, and start accumulating value
counts for the next interval
histogramToRecycle - a previously returned interval histogram that may be recycled to avoid allocation and
copy operations.enforceContainingInstance - if true, will only allow recycling of histograms previously returned from this
instance of IntervalHistogramProvider. If false, will allow recycling histograms
previously returned by other instances of IntervalHistogramProvider.void getIntervalHistogramInto(T targetHistogram)
targetHistogram.
Calling getIntervalHistogramInto() will reset
the value counts, and start accumulating value counts for the next interval.
targetHistogram - the histogram into which the interval histogram's data should be copiedCopyright © 2025. All rights reserved.