@NotThreadSafe public static class WriteOptions.Builder extends Object
WriteOptions
.Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
WriteOptions.Builder |
backpressureStrategy(io.reactivex.BackpressureOverflowStrategy backpressureStrategy)
Set the strategy to deal with buffer overflow when using onBackpressureBuffer.
|
WriteOptions.Builder |
batchSize(int batchSize)
Set the number of data point to collect in batch.
|
WriteOptions.Builder |
bufferLimit(int bufferLimit)
The client maintains a buffer for failed writes so that the writes will be retried later on.
|
WriteOptions |
build()
Build an instance of WriteOptions.
|
WriteOptions.Builder |
flushInterval(int flushInterval)
Set the time to wait at most (milliseconds).
|
WriteOptions.Builder |
jitterInterval(int jitterInterval)
Jitters the batch flush interval by a random amount.
|
WriteOptions.Builder |
retryInterval(int retryInterval)
Set the the time to wait before retry unsuccessful write (milliseconds).
|
WriteOptions.Builder |
writeScheduler(io.reactivex.Scheduler writeScheduler)
Set the scheduler which is used for write data points.
|
@Nonnull public WriteOptions.Builder batchSize(int batchSize)
batchSize
- the number of data point to collect in batchthis
@Nonnull public WriteOptions.Builder flushInterval(int flushInterval)
flushInterval
- the time to wait at most (milliseconds).this
@Nonnull public WriteOptions.Builder jitterInterval(int jitterInterval)
jitterInterval
- (milliseconds)this
@Nonnull public WriteOptions.Builder retryInterval(int retryInterval)
retryInterval
- the time to wait before retry unsuccessful writethis
@Nonnull public WriteOptions.Builder bufferLimit(int bufferLimit)
bufferLimit
- maximum number of points stored in the retry bufferthis
@Nonnull public WriteOptions.Builder writeScheduler(@Nonnull io.reactivex.Scheduler writeScheduler)
Schedulers.newThread()
.writeScheduler
- the scheduler which is used for write data points.this
@Nonnull public WriteOptions.Builder backpressureStrategy(@Nonnull io.reactivex.BackpressureOverflowStrategy backpressureStrategy)
backpressureStrategy
- the strategy to deal with buffer overflow when using onBackpressureBuffer.
Default BackpressureOverflowStrategy.DROP_OLDEST
;this
@Nonnull public WriteOptions build()
WriteOptions
Copyright © 2018–2019 InfluxData, Inc.. All rights reserved.