Class MetricSnapshots
Object
MetricSnapshots
- All Implemented Interfaces:
Iterable<MetricSnapshot>
Immutable list of metric snapshots.
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionMetricSnapshots
(MetricSnapshot... snapshots) MetricSnapshots
(Collection<MetricSnapshot> snapshots) To create MetricSnapshots, you can either call the constructor directly or usebuilder()
. -
Method Summary
Modifier and TypeMethodDescriptionstatic MetricSnapshots.Builder
builder()
get
(int i) iterator()
static MetricSnapshots
of
(MetricSnapshot... snapshots) int
size()
stream()
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface 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:
iterator
in interfaceIterable<MetricSnapshot>
-
size
-
get
-
stream
-
builder
-