Interface SlidingWeightedAverageBandwidthStatistic.SampleEvictionFunction
-
- Enclosing class:
- SlidingWeightedAverageBandwidthStatistic
public static interface SlidingWeightedAverageBandwidthStatistic.SampleEvictionFunction
An interface to decide if samples need to be evicted from the estimator.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
shouldEvictSample(Deque<SlidingWeightedAverageBandwidthStatistic.Sample> samples)
Whether the sample at the front of the queue needs to be evicted.
-
-
-
Method Detail
-
shouldEvictSample
boolean shouldEvictSample(Deque<SlidingWeightedAverageBandwidthStatistic.Sample> samples)
Whether the sample at the front of the queue needs to be evicted. Called before adding a next sample.- Parameters:
samples
- A queue of samples, ordered bySlidingWeightedAverageBandwidthStatistic.Sample.timeAddedMs
. The oldest sample is at front of the queue. The queue must not be modified.
-
-