public class NewtsWriter extends Object implements com.lmax.disruptor.EventHandler<SampleBatchEvent>
SampleRepository.
Calls to #insert() publish the samples to a ring buffer so
that they don't block while the data is being persisted.| Constructor and Description |
|---|
NewtsWriter(Integer maxBatchSize,
Integer ringBufferSize,
com.codahale.metrics.MetricRegistry registry) |
| Modifier and Type | Method and Description |
|---|---|
void |
insert(List<org.opennms.newts.api.Sample> samples) |
void |
onEvent(SampleBatchEvent event,
long sequence,
boolean endOfBatch) |
public void insert(List<org.opennms.newts.api.Sample> samples)
public void onEvent(SampleBatchEvent event, long sequence, boolean endOfBatch)
onEvent in interface com.lmax.disruptor.EventHandler<SampleBatchEvent>Copyright © 2015. All rights reserved.