Class TimeseriesWriter
- java.lang.Object
-
- org.opennms.netmgt.timeseries.samplewrite.TimeseriesWriter
-
- All Implemented Interfaces:
com.lmax.disruptor.WorkHandler<SampleBatchEvent>
,org.springframework.beans.factory.DisposableBean
public class TimeseriesWriter extends Object implements com.lmax.disruptor.WorkHandler<SampleBatchEvent>, org.springframework.beans.factory.DisposableBean
Used to write samples to theTimeSeriesStorage
. Calls to publish the samples to a ring buffer so that they don't block while the data is being persisted.- Author:
- jwhite
-
-
Constructor Summary
Constructors Constructor Description TimeseriesWriter(Integer ringBufferSize, Integer numWriterThreads, com.codahale.metrics.MetricRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
insert(List<org.opennms.integration.api.v1.timeseries.Sample> samples)
void
onEvent(SampleBatchEvent event)
void
setStats(StatisticsCollector stats)
void
setTimeSeriesStorage(TimeseriesStorageManager timeseriesStorage)
-
-
-
Method Detail
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
insert
public void insert(List<org.opennms.integration.api.v1.timeseries.Sample> samples)
-
onEvent
public void onEvent(SampleBatchEvent event)
- Specified by:
onEvent
in interfacecom.lmax.disruptor.WorkHandler<SampleBatchEvent>
-
setTimeSeriesStorage
public void setTimeSeriesStorage(TimeseriesStorageManager timeseriesStorage)
-
setStats
public void setStats(StatisticsCollector stats)
-
-