public class TimeseriesWriter extends Object implements com.lmax.disruptor.WorkHandler<SampleBatchEvent>, org.springframework.beans.factory.DisposableBean
SampleRepository.
 Calls to  publish the samples to a ring buffer so
 that they don't block while the data is being persisted.| Constructor and Description | 
|---|
TimeseriesWriter(Integer maxBatchSize,
                Integer ringBufferSize,
                Integer numWriterThreads,
                com.codahale.metrics.MetricRegistry registry)  | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
destroy()  | 
void | 
index(List<org.opennms.newts.api.Sample> samples)  | 
void | 
insert(List<org.opennms.newts.api.Sample> samples)  | 
void | 
onEvent(SampleBatchEvent event)  | 
void | 
setTimeSeriesMetaDataDao(TimeSeriesMetaDataDao timeSeriesMetaDataDao)  | 
void | 
setTimeSeriesStorage(TimeseriesStorageManager timeseriesStorage)  | 
@Inject
public TimeseriesWriter(@Named(value="timeseries.max_batch_size")
                                Integer maxBatchSize,
                                @Named(value="timeseries.ring_buffer_size")
                                Integer ringBufferSize,
                                @Named(value="timeseries.writer_threads")
                                Integer numWriterThreads,
                                @Named(value="timeseriesMetricRegistry")
                                com.codahale.metrics.MetricRegistry registry)
public void destroy()
             throws Exception
destroy in interface org.springframework.beans.factory.DisposableBeanExceptionpublic void insert(List<org.opennms.newts.api.Sample> samples)
public void index(List<org.opennms.newts.api.Sample> samples)
public void onEvent(SampleBatchEvent event) throws Exception
onEvent in interface com.lmax.disruptor.WorkHandler<SampleBatchEvent>Exceptionpublic void setTimeSeriesStorage(TimeseriesStorageManager timeseriesStorage)
public void setTimeSeriesMetaDataDao(TimeSeriesMetaDataDao timeSeriesMetaDataDao)
Copyright © 2020. All rights reserved.