SlidingWeightedAverageBandwidthStatistic.SampleEvictionFunction


interface SlidingWeightedAverageBandwidthStatistic.SampleEvictionFunction


An interface to decide if samples need to be evicted from the estimator.

Summary

Public functions

Boolean

Whether the sample at the front of the queue needs to be evicted.

Public functions

shouldEvictSample

fun shouldEvictSample(
    samples: Deque<SlidingWeightedAverageBandwidthStatistic.Sample!>!
): Boolean

Whether the sample at the front of the queue needs to be evicted. Called before adding a next sample.

Parameters
samples: Deque<SlidingWeightedAverageBandwidthStatistic.Sample!>!

A queue of samples, ordered by timeAddedMs. The oldest sample is at front of the queue. The queue must not be modified.