Class MaxSamplesPerPeriod

  • All Implemented Interfaces:
    SamplingStrategy

    public class MaxSamplesPerPeriod
    extends java.lang.Object
    implements SamplingStrategy
    Very basic sampling strategy which allows for sampling N requests within a fixed time window. No attempt is made to distribute the samples evenly within the time period; this is on a first-come, first-serve basis.
    • Constructor Detail

      • MaxSamplesPerPeriod

        public MaxSamplesPerPeriod​(MonotonicNanoClock nanoClock,
                                   long periodLengthInNanos,
                                   long maxSamplesPerPeriod)