public static class InfluxDbMeasurement.Builder extends Object
InfluxDbMeasurement.| Modifier and Type | Method and Description |
|---|---|
InfluxDbMeasurement |
build() |
boolean |
isValid() |
<T> InfluxDbMeasurement.Builder |
putField(String key,
T value)
Adds the given key-value pair to the fields map.
|
<T> InfluxDbMeasurement.Builder |
putFields(Map<String,T> fields)
Adds all key-value pairs to the fields map.
|
InfluxDbMeasurement.Builder |
putTag(String key,
String value)
Adds the key-value pair to the tags map.
|
InfluxDbMeasurement.Builder |
putTags(Map<String,String> items)
Adds all key-value pairs to the tags map.
|
<T> InfluxDbMeasurement.Builder |
tryPutFields(Map<String,T> fields,
java.util.function.Consumer<IllegalArgumentException> exceptionHandler)
Adds all key-value pairs to the fields map.
|
public Builder(String name, long timestamp)
public boolean isValid()
public InfluxDbMeasurement.Builder putTags(Map<String,String> items)
items - public InfluxDbMeasurement.Builder putTag(String key, String value)
public <T> InfluxDbMeasurement.Builder putFields(Map<String,T> fields)
IllegalArgumentException - if any value is not a String or primitive.public <T> InfluxDbMeasurement.Builder tryPutFields(Map<String,T> fields, java.util.function.Consumer<IllegalArgumentException> exceptionHandler)
public <T> InfluxDbMeasurement.Builder putField(String key, T value)
IllegalArgumentException - if any value is not a String or primitive.public InfluxDbMeasurement build()
Copyright © 2017. All rights reserved.