public class TimeseriesWriter extends Object implements com.lmax.disruptor.WorkHandler<SampleBatchEvent>, org.springframework.beans.factory.DisposableBean
TimeSeriesStorage
.
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 ringBufferSize,
Integer numWriterThreads,
com.codahale.metrics.MetricRegistry registry) |
Modifier and Type | Method and Description |
---|---|
void |
destroy() |
void |
index(List<org.opennms.integration.api.v1.timeseries.Sample> samples) |
void |
insert(List<org.opennms.integration.api.v1.timeseries.Sample> samples) |
void |
onEvent(SampleBatchEvent event) |
void |
setTimeSeriesMetaDataDao(TimeSeriesMetaDataDao timeSeriesMetaDataDao) |
void |
setTimeSeriesStorage(TimeseriesStorageManager timeseriesStorage) |
public void destroy()
destroy
in interface org.springframework.beans.factory.DisposableBean
public void insert(List<org.opennms.integration.api.v1.timeseries.Sample> samples)
public void index(List<org.opennms.integration.api.v1.timeseries.Sample> samples)
public void onEvent(SampleBatchEvent event) throws Exception
onEvent
in interface com.lmax.disruptor.WorkHandler<SampleBatchEvent>
Exception
public void setTimeSeriesStorage(TimeseriesStorageManager timeseriesStorage)
public void setTimeSeriesMetaDataDao(TimeSeriesMetaDataDao timeSeriesMetaDataDao)
Copyright © 2021. All rights reserved.