org.influxdb.impl.OneShotBatchWriter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of influxdb-java Show documentation
Show all versions of influxdb-java Show documentation
Java API to access the InfluxDB REST API
package org.influxdb.impl;
import org.influxdb.InfluxDB;
import org.influxdb.dto.BatchPoints;
import java.util.Collection;
/**
* Batch writer that tries to write BatchPoints exactly once.
*/
class OneShotBatchWriter implements BatchWriter {
private InfluxDB influxDB;
OneShotBatchWriter(final InfluxDB influxDB) {
this.influxDB = influxDB;
}
@Override
public void write(final Collection batchPointsCollection) {
for (BatchPoints batchPoints : batchPointsCollection) {
influxDB.write(batchPoints);
}
}
@Override
public void close() {
}
}