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

org.influxdb.impl.OneShotBatchWriter Maven / Gradle / Ivy

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() {

  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy