public static final class BatchProcessor.Builder
extends java.lang.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(java.util.function.BiConsumer<java.lang.Iterable<Point>,java.lang.Throwable> handler)
A callback to be used when an error occurs during a batchwrite.
|
BatchProcessor.Builder |
interval(int flushInterval,
int jitterInterval,
java.util.concurrent.TimeUnit unit)
The interval at which at least should issued a write.
|
BatchProcessor.Builder |
interval(int interval,
java.util.concurrent.TimeUnit unit)
The interval at which at least should issued a write.
|
BatchProcessor.Builder |
precision(java.util.concurrent.TimeUnit precision)
Set the time precision to use for the batch.
|
BatchProcessor.Builder |
threadFactory(java.util.concurrent.ThreadFactory threadFactory) |
public Builder(InfluxDB influxDB)
influxDB - is mandatory.public BatchProcessor.Builder threadFactory(java.util.concurrent.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, java.util.concurrent.TimeUnit unit)
interval - the intervalunit - the TimeUnit of the intervalpublic BatchProcessor.Builder interval(int flushInterval, int jitterInterval, java.util.concurrent.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(java.util.function.BiConsumer<java.lang.Iterable<Point>,java.lang.Throwable> handler)
handler - the handlerpublic BatchProcessor.Builder consistencyLevel(InfluxDB.ConsistencyLevel consistencyLevel)
consistencyLevel - the consistencyLevelpublic BatchProcessor.Builder precision(java.util.concurrent.TimeUnit precision)
precision - the precisionpublic BatchProcessor build()
Data In Motion GmbH all rights reserved