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 java.lang.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(java.lang.Integer ringBufferSize, java.lang.Integer numWriterThreads, com.codahale.metrics.MetricRegistry registry)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy()
void
insert(java.util.List<org.opennms.integration.api.v1.timeseries.Sample> samples)
void
onEvent(SampleBatchEvent event)
void
setTimeSeriesStorage(TimeseriesStorageManager timeseriesStorage)
-
-
-
Method Detail
-
destroy
public void destroy()
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
-
insert
public void insert(java.util.List<org.opennms.integration.api.v1.timeseries.Sample> samples)
-
onEvent
public void onEvent(SampleBatchEvent event) throws java.lang.Exception
- Specified by:
onEvent
in interfacecom.lmax.disruptor.WorkHandler<SampleBatchEvent>
- Throws:
java.lang.Exception
-
setTimeSeriesStorage
public void setTimeSeriesStorage(TimeseriesStorageManager timeseriesStorage)
-
-