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 |
build()
Create the BatchProcessor.
|
BatchProcessor.Builder |
exceptionHandler(BiConsumer<Iterable<Point>,Throwable> handler)
A callback to be used when an error occurs during a batchwrite.
|
BatchProcessor.Builder |
interval(int interval,
TimeUnit unit)
The interval at which at least should issued a write.
|
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 exceptionHandler(BiConsumer<Iterable<Point>,Throwable> handler)
handler
- the handlerpublic BatchProcessor build()
Copyright © 2017. All rights reserved.