Class RandomFixedSizeExemplarReservoir.RandomCellSelector
java.lang.Object
io.opentelemetry.sdk.metrics.internal.exemplar.RandomFixedSizeExemplarReservoir.RandomCellSelector
- All Implemented Interfaces:
ReservoirCellSelector
- Enclosing class:
RandomFixedSizeExemplarReservoir<T extends ExemplarData>
static class RandomFixedSizeExemplarReservoir.RandomCellSelector
extends Object
implements ReservoirCellSelector
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
reservoirCellIndex
(ReservoirCell[] cells) int
reservoirCellIndexFor
(ReservoirCell[] cells, double value, Attributes attributes, Context context) Determine the index of thecells
to record the measurement to.int
reservoirCellIndexFor
(ReservoirCell[] cells, long value, Attributes attributes, Context context) Determine the index of thecells
to record the measurement to.void
reset()
-
Field Details
-
numMeasurements
-
randomSupplier
-
-
Constructor Details
-
RandomCellSelector
-
-
Method Details
-
reservoirCellIndexFor
public int reservoirCellIndexFor(ReservoirCell[] cells, long value, Attributes attributes, Context context) Description copied from interface:ReservoirCellSelector
Determine the index of thecells
to record the measurement to.- Specified by:
reservoirCellIndexFor
in interfaceReservoirCellSelector
-
reservoirCellIndexFor
public int reservoirCellIndexFor(ReservoirCell[] cells, double value, Attributes attributes, Context context) Description copied from interface:ReservoirCellSelector
Determine the index of thecells
to record the measurement to.- Specified by:
reservoirCellIndexFor
in interfaceReservoirCellSelector
-
reservoirCellIndex
-
reset
public void reset()Description copied from interface:ReservoirCellSelector
- Specified by:
reset
in interfaceReservoirCellSelector
-