Class WriteApi
Inheritance
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public class WriteApi : object, IWriteApi, IDisposable
Constructors
WriteApi(InfluxDBClientOptions, WriteService, WriteOptions, IDomainObjectMapper, InfluxDBClient, IObservable<Unit>)
Declaration
protected WriteApi(InfluxDBClientOptions options, WriteService service, WriteOptions writeOptions, IDomainObjectMapper mapper, InfluxDBClient influxDbClient, IObservable<Unit> disposeCommand)
Parameters
Type | Name | Description |
---|---|---|
Influx |
options | |
Write |
service | |
Write |
writeOptions | |
IDomain |
mapper | |
Influx |
influxDbClient | |
IObservable<Unit> | disposeCommand |
Properties
Disposed
Declaration
public bool Disposed { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
Dispose()
Declaration
public void Dispose()
Flush()
Forces the client to flush all pending writes from the buffer to the InfluxDB via HTTP.
Declaration
public void Flush()
WriteMeasurement<TM>(TM, WritePrecision, String, String)
Write a Measurement into specified bucket.
Declaration
public void WriteMeasurement<TM>(TM measurement, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
TM | measurement | specifies the Measurement to write into bucket |
Write |
precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
Type Parameters
Name | Description |
---|---|
TM | measurement type |
WriteMeasurements<TM>(TM[], WritePrecision, String, String)
Write Measurements into specified bucket.
Declaration
public void WriteMeasurements<TM>(TM[] measurements, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
TM[] | measurements | specifies Measurements to write into bucket |
Write |
precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
Type Parameters
Name | Description |
---|---|
TM | measurement type |
WriteMeasurements<TM>(List<TM>, WritePrecision, String, String)
Write Measurements into specified bucket.
Declaration
public void WriteMeasurements<TM>(List<TM> measurements, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
List<TM> | measurements | specifies Measurements to write into bucket |
Write |
precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
Type Parameters
Name | Description |
---|---|
TM | measurement type |
WritePoint(PointData, String, String)
Write a Data point into specified bucket.
Declaration
public void WritePoint(PointData point, string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
Point |
point | specifies the Data point to write into bucket |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
WritePoints(PointData[], String, String)
Write Data points into specified bucket.
Declaration
public void WritePoints(PointData[] points, string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
Point |
points | specifies the Data points to write into bucket |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
WritePoints(List<PointData>, String, String)
Write Data points into specified bucket.
Declaration
public void WritePoints(List<PointData> points, string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
List<Point |
points | specifies the Data points to write into bucket |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
WriteRecord(String, WritePrecision, String, String)
Write Line Protocol record into specified bucket.
Declaration
public void WriteRecord(string record, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
record | specifies the record in InfluxDB Line Protocol.
The |
Write |
precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
WriteRecords(List<String>, WritePrecision, String, String)
Write Line Protocol records into specified bucket.
Declaration
public void WriteRecords(List<string> records, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
List<System. |
records | specifies the record in InfluxDB Line Protocol |
Write |
precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
WriteRecords(String[], WritePrecision, String, String)
Write Line Protocol records into specified bucket.
Declaration
public void WriteRecords(string[] records, WritePrecision precision = default(WritePrecision), string bucket = null, string org = null)
Parameters
Type | Name | Description |
---|---|---|
System. |
records | specifies the record in InfluxDB Line Protocol |
Write |
precision | specifies the precision for the unix timestamps within the body line-protocol; default Nanoseconds |
System. |
bucket | specifies the destination bucket for writes. If the bucket is not specified then is used config from Bucket. |
System. |
org | specifies the destination organization for writes. If the org is not specified then is used config from Org. |
Events
EventHandler
Declaration
public event EventHandler EventHandler
Event Type
Type | Description |
---|---|
Event |