public static final class BatchProcessor.Builder extends Object
Modifier and Type | Method and Description |
---|---|
BatchProcessor.Builder |
actions(int maxActions)
The number of actions after which a batchwrite must be performed.
|
BatchProcessor.Builder |
bufferLimit(int bufferLimit)
A buffer for failed writes so that the writes will be retried later on.
|
BatchProcessor |
build()
Create the BatchProcessor.
|
BatchProcessor.Builder |
consistencyLevel(InfluxDB.ConsistencyLevel consistencyLevel)
Consistency level for batch write.
|
BatchProcessor.Builder |
exceptionHandler(BiConsumer<Iterable<Point>,Throwable> handler)
A callback to be used when an error occurs during a batchwrite.
|
BatchProcessor.Builder |
interval(int flushInterval,
int jitterInterval,
TimeUnit unit)
The interval at which at least should issued a write.
|
BatchProcessor.Builder |
interval(int interval,
TimeUnit unit)
The interval at which at least should issued a write.
|
BatchProcessor.Builder |
precision(TimeUnit precision)
Set the time precision to use for the batch.
|
BatchProcessor.Builder |
threadFactory(ThreadFactory threadFactory) |
public Builder(InfluxDB influxDB)
influxDB
- is mandatory.public BatchProcessor.Builder threadFactory(ThreadFactory threadFactory)
threadFactory
- is optional.public BatchProcessor.Builder actions(int maxActions)
maxActions
- number of Points written after which a write must happen.public BatchProcessor.Builder interval(int interval, TimeUnit unit)
interval
- the intervalunit
- the TimeUnit of the intervalpublic BatchProcessor.Builder interval(int flushInterval, int jitterInterval, TimeUnit unit)
flushInterval
- the flush intervaljitterInterval
- the flush jitter intervalunit
- the TimeUnit of the intervalpublic BatchProcessor.Builder bufferLimit(int bufferLimit)
bufferLimit
- maximum number of points stored in the bufferpublic BatchProcessor.Builder exceptionHandler(BiConsumer<Iterable<Point>,Throwable> handler)
handler
- the handlerpublic BatchProcessor.Builder consistencyLevel(InfluxDB.ConsistencyLevel consistencyLevel)
consistencyLevel
- the consistencyLevelpublic BatchProcessor.Builder precision(TimeUnit precision)
precision
- the precisionpublic BatchProcessor build()
Copyright © 2019. All rights reserved.