Class StateSetSnapshot.StateSetDataPointSnapshot
Object
DataPointSnapshot
StateSetDataPointSnapshot
- All Implemented Interfaces:
Iterable<StateSetSnapshot.State>
- Enclosing class:
- StateSetSnapshot
public static class StateSetSnapshot.StateSetDataPointSnapshot
extends DataPointSnapshot
implements Iterable<StateSetSnapshot.State>
-
Nested Class Summary
-
Constructor Summary
ConstructorDescriptionStateSetDataPointSnapshot
(String[] names, boolean[] values, Labels labels) To create a newStateSetSnapshot.StateSetDataPointSnapshot
, you can either call the constructor directly or use the Builder withbuilder()
.StateSetDataPointSnapshot
(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) Constructor with an additional scrape timestamp. -
Method Summary
Methods inherited from class DataPointSnapshot
getCreatedTimestampMillis, getLabels, getScrapeTimestampMillis, hasCreatedTimestamp, hasScrapeTimestamp
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface Iterable
forEach, spliterator
-
Constructor Details
-
StateSetDataPointSnapshot
To create a newStateSetSnapshot.StateSetDataPointSnapshot
, you can either call the constructor directly or use the Builder withbuilder()
.- Parameters:
names
- state names. Must have at least 1 entry. The constructor will create a copy of the array.values
- state values. Must have the same length asnames
. The constructor will create a copy of the array.labels
- must not be null. UseLabels.EMPTY
if there are no labels.
-
StateSetDataPointSnapshot
public StateSetDataPointSnapshot(String[] names, boolean[] values, Labels labels, long scrapeTimestampMillis) Constructor with an additional scrape timestamp. This is only useful in rare cases as the scrape timestamp is usually set by the Prometheus server during scraping. Exceptions include mirroring metrics with given timestamps from other metric sources.
-
-
Method Details
-
size
-
getName
-
isTrue
-
iterator
- Specified by:
iterator
in interfaceIterable<StateSetSnapshot.State>
-
stream
-
builder
-