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 intprivate static final AtomicIntegerprivate longprivate final MetricReaderprivate final ViewRegistry -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateRegisteredReader(MetricReader metricReader, ViewRegistry viewRegistry) -
Method Summary
Modifier and TypeMethodDescriptionstatic RegisteredReadercreate(MetricReader reader, ViewRegistry viewRegistry) Construct a new collection info object storing information for collection against a reader.booleanlongGet the time of the last collection for the reader.Get theViewRegistryfor the reader.inthashCode()voidsetLastCollectEpochNanos(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'sMetricProducerafter 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.DELTAtemporality. -
getViewRegistry
Get theViewRegistryfor the reader. -
hashCode
public int hashCode() -
equals
-
toString
-