Class 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 the TimeSeriesStorage. Calls to publish the samples to a ring buffer so that they don't block while the data is being persisted.
    Author:
    jwhite
    • Constructor Detail

      • TimeseriesWriter

        @Inject
        public TimeseriesWriter​(@Named("timeseries.ring_buffer_size")
                                Integer ringBufferSize,
                                @Named("timeseries.writer_threads")
                                Integer numWriterThreads,
                                @Named("timeseriesMetricRegistry")
                                com.codahale.metrics.MetricRegistry registry)
    • Method Detail

      • destroy

        public void destroy()
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
      • insert

        public void insert​(List<org.opennms.integration.api.v1.timeseries.Sample> samples)