Class RegisteredReader
- java.lang.Object
-
- io.opentelemetry.sdk.metrics.internal.export.RegisteredReader
-
public class RegisteredReader extends java.lang.ObjectRepresents aMetricReaderregistered withSdkMeterProvider.This class is internal and is hence not for public use. Its APIs are unstable and can change at any time.
-
-
Field Summary
Fields Modifier and Type Field Description private intidprivate static java.util.concurrent.atomic.AtomicIntegerID_COUNTERprivate longlastCollectEpochNanosprivate MetricReadermetricReaderprivate ViewRegistryviewRegistry
-
Constructor Summary
Constructors Modifier Constructor Description privateRegisteredReader(MetricReader metricReader, ViewRegistry viewRegistry)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RegisteredReadercreate(MetricReader reader, ViewRegistry viewRegistry)Construct a new collection info object storing information for collection against a reader.booleanequals(java.lang.Object o)longgetLastCollectEpochNanos()Get the time of the last collection for the reader.MetricReadergetReader()ViewRegistrygetViewRegistry()Get theViewRegistryfor the reader.inthashCode()voidsetLastCollectEpochNanos(long epochNanos)Set the time the last collection took place for the reader.java.lang.StringtoString()
-
-
-
Field Detail
-
ID_COUNTER
private static final java.util.concurrent.atomic.AtomicInteger ID_COUNTER
-
id
private final int id
-
metricReader
private final MetricReader metricReader
-
viewRegistry
private final ViewRegistry viewRegistry
-
lastCollectEpochNanos
private volatile long lastCollectEpochNanos
-
-
Constructor Detail
-
RegisteredReader
private RegisteredReader(MetricReader metricReader, ViewRegistry viewRegistry)
-
-
Method Detail
-
create
public static RegisteredReader create(MetricReader reader, ViewRegistry viewRegistry)
Construct a new collection info object storing information for collection against a reader.
-
getReader
public MetricReader 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
public ViewRegistry getViewRegistry()
Get theViewRegistryfor the reader.
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(@Nullable java.lang.Object o)- Overrides:
equalsin classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-