com.izettle.metrics.influxdb.data.InfluxDbPoint Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of metrics-influxdb Show documentation
Show all versions of metrics-influxdb Show documentation
A reporter for Metrics which announces measurements to a InfluxDb server.
package com.izettle.metrics.influxdb.data;
import java.util.Collections;
import java.util.Map;
/**
* This class is a bean that holds time series data of a point. A point co relates to a metric.
*/
public class InfluxDbPoint {
private String measurement;
private Map tags = Collections.emptyMap();
private String timestamp;
private Map fields = Collections.emptyMap();
public InfluxDbPoint(final String measurement, final String timestamp, final Map fields) {
this.measurement = measurement;
this.timestamp = timestamp;
if (fields != null) {
this.fields = Collections.unmodifiableMap(fields);
}
}
public InfluxDbPoint(String measurement, Map tags, String timestamp, Map fields) {
this.measurement = measurement;
if (tags != null) {
this.tags = Collections.unmodifiableMap(tags);
}
this.timestamp = timestamp;
if (fields != null) {
this.fields = Collections.unmodifiableMap(fields);
}
}
public String getMeasurement() {
return measurement;
}
public void setMeasurement(String measurement) {
this.measurement = measurement;
}
public Map getTags() {
return tags;
}
public void setTags(Map tags) {
if (tags != null) {
this.tags = Collections.unmodifiableMap(tags);
}
}
public String getTimestamp() {
return timestamp;
}
public void setTimestamp(String timestamp) {
this.timestamp = timestamp;
}
public Map getFields() {
return fields;
}
public void setFields(Map fields) {
if (fields != null) {
this.fields = Collections.unmodifiableMap(fields);
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy