Module io.prometheus.metrics.model
Class MetricSnapshots
java.lang.Object
io.prometheus.metrics.model.snapshots.MetricSnapshots
- All Implemented Interfaces:
Iterable<MetricSnapshot>
Immutable list of metric snapshots.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMetricSnapshots(MetricSnapshot... snapshots) MetricSnapshots(Collection<MetricSnapshot> snapshots) To create MetricSnapshots, you can either call the constructor directly or usebuilder(). -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricSnapshots.Builderbuilder()get(int i) iterator()static MetricSnapshotsof(MetricSnapshot... snapshots) intsize()stream()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
MetricSnapshots
-
MetricSnapshots
To create MetricSnapshots, you can either call the constructor directly or usebuilder().- Parameters:
snapshots- the constructor creates a sorted copy of snapshots.- Throws:
IllegalArgumentException- if snapshots contains duplicate metric names. To avoid duplicate metric names usebuilder()and checkMetricSnapshots.Builder.containsMetricName(String)before callingMetricSnapshots.Builder.metricSnapshot(MetricSnapshot).
-
-
Method Details
-
of
-
iterator
- Specified by:
iteratorin interfaceIterable<MetricSnapshot>
-
size
public int size() -
get
-
stream
-
builder
-