All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.izettle.metrics.influxdb.data.InfluxDbWriteObject Maven / Gradle / Ivy

There is a newer version: 0.40.13
Show newest version
package com.izettle.metrics.influxdb.data;

import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.TimeUnit;

/**
 * This class contains the request object to be sent to InfluxDb for writing. It contains a collection of points.
 */
public class InfluxDbWriteObject {

    private String database;

    private TimeUnit precision;

    private Set points;

    private Map tags = Collections.emptyMap();

    public InfluxDbWriteObject(final String database, final TimeUnit precision) {
        this.points = new HashSet();
        this.database = database;
        this.precision = precision;
    }

    public String getDatabase() {
        return database;
    }

    public void setDatabase(String database) {
        this.database = database;
    }

    public TimeUnit getPrecision() {
        return precision;
    }

    public void setPrecision(TimeUnit precision) {
        this.precision = precision;
    }

    public Set getPoints() {
        return points;
    }

    public void setPoints(Set points) {
        this.points = points;
    }

    public Map getTags() {
        return tags;
    }

    public void setTags(Map tags) {
        this.tags = Collections.unmodifiableMap(tags);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy