Class WriteOptions.Builder
Inheritance
Namespace: InfluxDB.Client
Assembly: InfluxDB.Client.dll
Syntax
public sealed class Builder : object
Methods
BatchSize(Int32)
Set the number of data point to collect in batch.
Declaration
public WriteOptions.Builder BatchSize(int batchSize)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | batchSize | the number of data point to collect in batch |
Returns
| Type | Description |
|---|---|
| WriteOptions.Builder | this |
Build()
Build an instance of WriteOptions.
Declaration
public WriteOptions Build()
Returns
| Type | Description |
|---|---|
| WriteOptions |
Remarks
Deprecated - please use use object initializer WriteOptions()
ExponentialBase(Int32)
The base for the exponential retry delay.
Declaration
public WriteOptions.Builder ExponentialBase(int exponentialBase)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | exponentialBase | exponential base |
Returns
| Type | Description |
|---|---|
| WriteOptions.Builder | this |
FlushInterval(Int32)
Set the time to wait at most (milliseconds).
Declaration
public WriteOptions.Builder FlushInterval(int milliseconds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | milliseconds | the time to wait at most (milliseconds). |
Returns
| Type | Description |
|---|---|
| WriteOptions.Builder | this |
JitterInterval(Int32)
Jitters the batch flush interval by a random amount. This is primarily to avoid large write spikes for users running a large number of client instances. ie, a jitter of 5s and flush duration 10s means flushes will happen every 10-15s.
Declaration
public WriteOptions.Builder JitterInterval(int milliseconds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | milliseconds | Jitter interval in milliseconds |
Returns
| Type | Description |
|---|---|
| WriteOptions.Builder | this |
MaxRetries(Int32)
The number of max retries when write fails.
Declaration
public WriteOptions.Builder MaxRetries(int count)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | count | number of max retries |
Returns
| Type | Description |
|---|---|
| WriteOptions.Builder | this |
MaxRetryDelay(Int32)
The maximum delay between each retry attempt in milliseconds.
Declaration
public WriteOptions.Builder MaxRetryDelay(int milliseconds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | milliseconds | maximum delay |
Returns
| Type | Description |
|---|---|
| WriteOptions.Builder | this |
RetryInterval(Int32)
Set the the time to wait before retry unsuccessful write (milliseconds).
The retry interval is used when the InfluxDB server does not specify "Retry-After" header.
Retry-After: A non-negative decimal integer indicating the seconds to delay after the response is received.
Declaration
public WriteOptions.Builder RetryInterval(int milliseconds)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | milliseconds | the time to wait before retry unsuccessful write |
Returns
| Type | Description |
|---|---|
| WriteOptions.Builder | this |
WriteScheduler(IScheduler)
Set the scheduler which is used for write data points. It is useful for disabling batch writes or
for tuning the performance. Default value is
Declaration
public WriteOptions.Builder WriteScheduler(IScheduler writeScheduler)
Parameters
| Type | Name | Description |
|---|---|---|
| IScheduler | writeScheduler |
Returns
| Type | Description |
|---|---|
| WriteOptions.Builder |