Class RegisteredReader
java.lang.Object
io.opentelemetry.sdk.metrics.internal.export.RegisteredReader
Represents a
MetricReader
registered with SdkMeterProvider
.
This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final int
private static final AtomicInteger
private long
private final MetricReader
private final ViewRegistry
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
RegisteredReader
(MetricReader metricReader, ViewRegistry viewRegistry) -
Method Summary
Modifier and TypeMethodDescriptionstatic RegisteredReader
create
(MetricReader reader, ViewRegistry viewRegistry) Construct a new collection info object storing information for collection against a reader.boolean
long
Get the time of the last collection for the reader.Get theViewRegistry
for the reader.int
hashCode()
void
setLastCollectEpochNanos
(long epochNanos) Set the time the last collection took place for the reader.toString()
-
Field Details
-
ID_COUNTER
-
id
private final int id -
metricReader
-
viewRegistry
-
lastCollectEpochNanos
private volatile long lastCollectEpochNanos
-
-
Constructor Details
-
RegisteredReader
-
-
Method Details
-
create
Construct a new collection info object storing information for collection against a reader. -
getReader
-
setLastCollectEpochNanos
public void setLastCollectEpochNanos(long epochNanos) Set the time the last collection took place for the reader.Called by
SdkMeterProvider
'sMetricProducer
after collection. -
getLastCollectEpochNanos
public long getLastCollectEpochNanos()Get the time of the last collection for the reader.Used to compute the
PointData.getStartEpochNanos()
for instruments aggregations withAggregationTemporality.DELTA
temporality. -
getViewRegistry
Get theViewRegistry
for the reader. -
hashCode
public int hashCode() -
equals
-
toString
-