Interface WriteApiBlocking


@ThreadSafe public interface WriteApiBlocking
The synchronous blocking API to Write time-series data into InfluxDB 2.x.

The data are formatted in Line Protocol.

Author:
Jakub Bednar (bednar@github) (20/09/2018 10:58)
  • Method Details

    • writeRecord

      void writeRecord(@Nonnull WritePrecision precision, @Nullable String record) throws InfluxException
      Write Line Protocol record into specified bucket.

      The InfluxDBClientOptions.getBucket() will be use as destination bucket and InfluxDBClientOptions.getOrg() will be used as destination organization.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeRecord(WritePrecision, String).

      Parameters:
      precision - specifies the precision for the unix timestamps within the body line-protocol (optional)
      record - specifies the record in InfluxDB Line Protocol. The record is considered as one batch unit.
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeRecord

      void writeRecord(@Nonnull String bucket, @Nonnull String org, @Nonnull WritePrecision precision, @Nullable String record) throws InfluxException
      Write Line Protocol record into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeRecords(String, String, WritePrecision, List).

      Parameters:
      bucket - specifies the destination bucket for writes
      org - specifies the destination organization for writes
      precision - specifies the precision for the unix timestamps within the body line-protocol (optional)
      record - specifies the record in InfluxDB Line Protocol. The record is considered as one batch unit.
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeRecord

      void writeRecord(@Nullable String record, @Nonnull WriteParameters parameters) throws InfluxException
      Write Line Protocol record into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeRecord(String, WriteParameters).

      Parameters:
      record - specifies the record in InfluxDB Line Protocol. The record is considered as one batch unit.
      parameters - specify InfluxDB Write endpoint parameters
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeRecords

      void writeRecords(@Nonnull WritePrecision precision, @Nonnull List<String> records) throws InfluxException
      Write Line Protocol records into specified bucket.

      The InfluxDBClientOptions.getBucket() will be use as destination bucket and InfluxDBClientOptions.getOrg() will be used as destination organization.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeRecords(WritePrecision, List).

      Parameters:
      precision - specifies the precision for the unix timestamps within the body line-protocol (optional)
      records - specifies the records in InfluxDB Line Protocol
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeRecords

      void writeRecords(@Nonnull String bucket, @Nonnull String org, @Nonnull WritePrecision precision, @Nonnull List<String> records) throws InfluxException
      Write Line Protocol records into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeRecords(String, String, WritePrecision, List).

      Parameters:
      bucket - specifies the destination bucket for writes
      org - specifies the destination organization for writes
      precision - specifies the precision for the unix timestamps within the body line-protocol (optional)
      records - specifies the records in InfluxDB Line Protocol
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeRecords

      void writeRecords(@Nonnull List<String> records, @Nonnull WriteParameters parameters) throws InfluxException
      Write Line Protocol records into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeRecords(List, WriteParameters).

      Parameters:
      records - specifies the records in InfluxDB Line Protocol
      parameters - specify InfluxDB Write endpoint parameters
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writePoint

      void writePoint(@Nullable Point point) throws InfluxException
      Write Data point into specified bucket.

      The InfluxDBClientOptions.getBucket() will be use as destination bucket and InfluxDBClientOptions.getOrg() will be used as destination organization.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writePoint(Point).

      Parameters:
      point - specifies the Data point to write into bucket
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writePoint

      void writePoint(@Nonnull String bucket, @Nonnull String org, @Nullable Point point) throws InfluxException
      Write Data point into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writePoint(String, String, Point).

      Parameters:
      bucket - specifies the destination bucket for writes
      org - specifies the destination organization for writes
      point - specifies the Data point to write into bucket
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writePoint

      void writePoint(@Nullable Point point, @Nonnull WriteParameters parameters) throws InfluxException
      Write Data point into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writePoint(Point, WriteParameters).

      Parameters:
      point - specifies the Data point to write into bucket
      parameters - specify InfluxDB Write endpoint parameters
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writePoints

      void writePoints(@Nonnull List<Point> points) throws InfluxException
      Write Data points into specified bucket.

      The InfluxDBClientOptions.getBucket() will be use as destination bucket and InfluxDBClientOptions.getOrg() will be used as destination organization.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writePoints(List).

      Parameters:
      points - specifies the Data points to write into bucket
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writePoints

      void writePoints(@Nonnull String bucket, @Nonnull String org, @Nonnull List<Point> points) throws InfluxException
      Write Data points into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writePoints(String, String, List).

      Parameters:
      bucket - specifies the destination bucket ID for writes
      org - specifies the destination organization ID for writes
      points - specifies the Data points to write into bucket
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writePoints

      void writePoints(@Nonnull List<Point> points, @Nonnull WriteParameters parameters) throws InfluxException
      Write Data points into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writePoints(List, WriteParameters).

      Parameters:
      points - specifies the Data points to write into bucket
      parameters - specify InfluxDB Write endpoint parameters
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeMeasurement

      <M> void writeMeasurement(@Nonnull WritePrecision precision, @Nullable M measurement) throws InfluxException
      Write Measurement into specified bucket.

      The InfluxDBClientOptions.getBucket() will be use as destination bucket and InfluxDBClientOptions.getOrg() will be used as destination organization.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeMeasurement(WritePrecision, Object).

      Type Parameters:
      M - measurement type
      Parameters:
      precision - specifies the precision for the unix timestamps within the body line-protocol (optional)
      measurement - specifies the Measurement to write into bucket
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeMeasurement

      <M> void writeMeasurement(@Nonnull String bucket, @Nonnull String org, @Nonnull WritePrecision precision, @Nullable M measurement) throws InfluxException
      Write Measurement into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeMeasurement(String, String, WritePrecision, Object).

      Type Parameters:
      M - measurement type
      Parameters:
      bucket - specifies the destination bucket for writes
      org - specifies the destination organization for writes
      precision - specifies the precision for the unix timestamps within the body line-protocol (optional)
      measurement - specifies the Measurement to write into bucket
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeMeasurement

      <M> void writeMeasurement(@Nullable M measurement, @Nonnull WriteParameters parameters) throws InfluxException
      Write Measurement into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeMeasurement(Object, WriteParameters).

      Type Parameters:
      M - measurement type
      Parameters:
      measurement - specifies the Measurement to write into bucket
      parameters - specify InfluxDB Write endpoint parameters
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeMeasurements

      <M> void writeMeasurements(@Nonnull WritePrecision precision, @Nonnull List<M> measurements) throws InfluxException
      Write Measurements into specified bucket.

      The InfluxDBClientOptions.getBucket() will be use as destination bucket and InfluxDBClientOptions.getOrg() will be used as destination organization.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeMeasurements(WritePrecision, List).

      Type Parameters:
      M - measurement type
      Parameters:
      precision - specifies the precision for the unix timestamps within the body line-protocol (optional)
      measurements - specifies the Measurements to write into bucket
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeMeasurements

      <M> void writeMeasurements(@Nonnull String bucket, @Nonnull String org, @Nonnull WritePrecision precision, @Nonnull List<M> measurements) throws InfluxException
      Write Measurements into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeMeasurements(String, String, WritePrecision, List).

      Type Parameters:
      M - measurement type
      Parameters:
      bucket - specifies the destination bucket for writes
      org - specifies the destination organization for writes
      precision - specifies the precision for the unix timestamps within the body line-protocol (optional)
      measurements - specifies the Measurements to write into bucket
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB
    • writeMeasurements

      <M> void writeMeasurements(@Nonnull List<M> measurements, @Nonnull WriteParameters parameters) throws InfluxException
      Write Measurements into specified bucket.

      NOTE: This method directly write data info InfluxDB 2.x without batching, jittering and backpressure. The method blocks the executing thread until their operation finished. There is also non-blocking alternative WriteApi.writeMeasurements(List, WriteParameters).

      Type Parameters:
      M - measurement type
      Parameters:
      measurements - specifies the Measurements to write into bucket
      parameters - specify InfluxDB Write endpoint parameters
      Throws:
      InfluxException - if a problem occurred during write time-series data into InfluxDB