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 intreservoirCellIndex(ReservoirCell[] cells) intreservoirCellIndexFor(ReservoirCell[] cells, double value, Attributes attributes, Context context) Determine the index of thecellsto record the measurement to.intreservoirCellIndexFor(ReservoirCell[] cells, long value, Attributes attributes, Context context) Determine the index of thecellsto record the measurement to.voidreset()
-
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:ReservoirCellSelectorDetermine the index of thecellsto record the measurement to.- Specified by:
reservoirCellIndexForin interfaceReservoirCellSelector
-
reservoirCellIndexFor
public int reservoirCellIndexFor(ReservoirCell[] cells, double value, Attributes attributes, Context context) Description copied from interface:ReservoirCellSelectorDetermine the index of thecellsto record the measurement to.- Specified by:
reservoirCellIndexForin interfaceReservoirCellSelector
-
reservoirCellIndex
-
reset
public void reset()Description copied from interface:ReservoirCellSelector- Specified by:
resetin interfaceReservoirCellSelector
-