public final class BatchOptions extends Object implements Cloneable
InfluxDB.enableBatch(BatchOptions)| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_BATCH_ACTIONS_LIMIT |
static int |
DEFAULT_BATCH_INTERVAL_DURATION |
static int |
DEFAULT_BUFFER_LIMIT |
static int |
DEFAULT_JITTER_INTERVAL_DURATION |
static TimeUnit |
DEFAULT_PRECISION |
static BatchOptions |
DEFAULTS
Default batch options.
|
| Modifier and Type | Method and Description |
|---|---|
BatchOptions |
actions(int actions) |
BatchOptions |
bufferLimit(int bufferLimit)
The client maintains a buffer for failed writes so that the writes will be retried later on.
|
BatchOptions |
consistency(InfluxDB.ConsistencyLevel consistency) |
BatchOptions |
exceptionHandler(BiConsumer<Iterable<Point>,Throwable> exceptionHandler) |
BatchOptions |
flushDuration(int flushDuration) |
int |
getActions() |
int |
getBufferLimit() |
InfluxDB.ConsistencyLevel |
getConsistency() |
BiConsumer<Iterable<Point>,Throwable> |
getExceptionHandler() |
int |
getFlushDuration() |
int |
getJitterDuration() |
TimeUnit |
getPrecision() |
ThreadFactory |
getThreadFactory() |
BatchOptions |
jitterDuration(int jitterDuration)
Jitters the batch flush interval by a random amount.
|
BatchOptions |
precision(TimeUnit precision)
Set the time precision to use for the whole batch.
|
BatchOptions |
threadFactory(ThreadFactory threadFactory) |
public static final int DEFAULT_BATCH_ACTIONS_LIMIT
public static final int DEFAULT_BATCH_INTERVAL_DURATION
public static final int DEFAULT_JITTER_INTERVAL_DURATION
public static final int DEFAULT_BUFFER_LIMIT
public static final TimeUnit DEFAULT_PRECISION
public static final BatchOptions DEFAULTS
public BatchOptions actions(int actions)
actions - the number of actions to collectpublic BatchOptions flushDuration(int flushDuration)
flushDuration - the time to wait at most (milliseconds).public BatchOptions jitterDuration(int jitterDuration)
jitterDuration - (milliseconds)public BatchOptions bufferLimit(int bufferLimit)
getActions()bufferLimit - maximum number of points stored in the retry bufferpublic BatchOptions threadFactory(ThreadFactory threadFactory)
threadFactory - a ThreadFactory instance to be usedpublic BatchOptions exceptionHandler(BiConsumer<Iterable<Point>,Throwable> exceptionHandler)
exceptionHandler - a consumer function to handle asynchronous errorspublic BatchOptions consistency(InfluxDB.ConsistencyLevel consistency)
consistency - cluster consistency setting (how many nodes have to store data points
to treat a write as a success)public BatchOptions precision(TimeUnit precision)
TimeUnit.NANOSECONDS.precision - sets the precision to usepublic int getActions()
public int getFlushDuration()
public int getJitterDuration()
public int getBufferLimit()
bufferLimit(int)public ThreadFactory getThreadFactory()
public BiConsumer<Iterable<Point>,Throwable> getExceptionHandler()
public InfluxDB.ConsistencyLevel getConsistency()
public TimeUnit getPrecision()
Copyright © 2020. All rights reserved.