Package com.influxdb.client.internal
Class AbstractWriteClient
java.lang.Object
com.influxdb.internal.AbstractRestClient
com.influxdb.client.internal.AbstractWriteClient
- All Implemented Interfaces:
AutoCloseable
- Author:
- Jakub Bednar (bednar@github) (21/11/2018 09:26)
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic interface
static final class
static final class
static final class
static final class
static final class
The Batch Write Item. -
Field Summary
Modifier and TypeFieldDescriptionprotected final MeasurementMapper
protected final InfluxDBClientOptions
-
Constructor Summary
ConstructorDescriptionAbstractWriteClient
(WriteOptions writeOptions, InfluxDBClientOptions options, io.reactivex.rxjava3.core.Scheduler processorScheduler, WriteService service, Collection<AutoCloseable> autoCloseables) -
Method Summary
Modifier and TypeMethodDescriptionprotected <T extends AbstractWriteEvent>
io.reactivex.rxjava3.core.Observable<T> addEventListener
(Class<T> eventType) void
close()
void
flush()
static <T> io.reactivex.rxjava3.core.FlowableTransformer
<T, T> jitter
(io.reactivex.rxjava3.core.Scheduler scheduler, WriteApi.RetryOptions retryOptions) Add Jitter delay to upstream.static io.reactivex.rxjava3.functions.Function
<io.reactivex.rxjava3.core.Flowable<Throwable>, org.reactivestreams.Publisher<?>> retry
(io.reactivex.rxjava3.core.Scheduler retryScheduler, WriteApi.RetryOptions retryOptions, BiConsumer<Throwable, Long> notify) Add Retry handler to upstream.void
write
(WriteParameters writeParameters, org.reactivestreams.Publisher<AbstractWriteClient.BatchWriteData> stream) void
writePoints
(WriteParameters writeParameters, io.reactivex.rxjava3.core.Flowable<AbstractWriteClient.BatchWriteDataPoint> stream) Methods inherited from class com.influxdb.internal.AbstractRestClient
execute, getLogLevel, ping, responseToError, setLogLevel, toInfluxException, version
-
Field Details
-
options
-
measurementMapper
-
-
Constructor Details
-
AbstractWriteClient
public AbstractWriteClient(@Nonnull WriteOptions writeOptions, @Nonnull InfluxDBClientOptions options, @Nonnull io.reactivex.rxjava3.core.Scheduler processorScheduler, @Nonnull WriteService service, @Nonnull Collection<AutoCloseable> autoCloseables)
-
-
Method Details
-
addEventListener
@Nonnull protected <T extends AbstractWriteEvent> io.reactivex.rxjava3.core.Observable<T> addEventListener(@Nonnull Class<T> eventType) -
flush
public void flush() -
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-
writePoints
public void writePoints(@Nonnull WriteParameters writeParameters, @Nonnull io.reactivex.rxjava3.core.Flowable<AbstractWriteClient.BatchWriteDataPoint> stream) -
write
public void write(@Nonnull WriteParameters writeParameters, @Nonnull org.reactivestreams.Publisher<AbstractWriteClient.BatchWriteData> stream) -
jitter
@Nonnull public static <T> io.reactivex.rxjava3.core.FlowableTransformer<T,T> jitter(@Nonnull io.reactivex.rxjava3.core.Scheduler scheduler, @Nonnull WriteApi.RetryOptions retryOptions) Add Jitter delay to upstream.- Type Parameters:
T
- upstream type- Parameters:
scheduler
- to use for timer operatorretryOptions
- with configured jitter interval- Returns:
- Flowable with jitter delay
-
retry
@Nonnull public static io.reactivex.rxjava3.functions.Function<io.reactivex.rxjava3.core.Flowable<Throwable>,org.reactivestreams.Publisher<?>> retry(@Nonnull io.reactivex.rxjava3.core.Scheduler retryScheduler, @Nonnull WriteApi.RetryOptions retryOptions, @Nonnull BiConsumer<Throwable, Long> notify) Add Retry handler to upstream.- Parameters:
retryScheduler
- for retry delayretryOptions
- with configured retry strategynotify
- to notify about retryable error- Returns:
- Flowable with retry handler
-