Class ProducerRunner<M extends Message>
- java.lang.Object
-
- org.nuxeo.lib.stream.pattern.producer.internals.ProducerRunner<M>
-
- All Implemented Interfaces:
Callable<ProducerStatus>
public class ProducerRunner<M extends Message> extends Object implements Callable<ProducerStatus>
A callable pulling a producer iterator in loop.- Since:
- 9.1
-
-
Field Summary
Fields Modifier and Type Field Description protected LogAppender<M>
appender
protected long
counter
protected ProducerFactory<M>
factory
protected int
producerId
protected io.dropwizard.metrics5.Counter
producersCount
protected io.dropwizard.metrics5.Timer
producerTimer
protected io.dropwizard.metrics5.MetricRegistry
registry
protected String
threadName
-
Constructor Summary
Constructors Constructor Description ProducerRunner(ProducerFactory<M> factory, LogAppender<M> appender, int producerId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ProducerStatus
call()
protected void
producerLoop(ProducerIterator<M> producer)
protected void
setThreadName(M message)
-
-
-
Field Detail
-
producerId
protected final int producerId
-
appender
protected final LogAppender<M extends Message> appender
-
factory
protected final ProducerFactory<M extends Message> factory
-
threadName
protected String threadName
-
registry
protected final io.dropwizard.metrics5.MetricRegistry registry
-
producerTimer
protected final io.dropwizard.metrics5.Timer producerTimer
-
producersCount
protected final io.dropwizard.metrics5.Counter producersCount
-
counter
protected long counter
-
-
Constructor Detail
-
ProducerRunner
public ProducerRunner(ProducerFactory<M> factory, LogAppender<M> appender, int producerId)
-
-
Method Detail
-
call
public ProducerStatus call() throws Exception
-
producerLoop
protected void producerLoop(ProducerIterator<M> producer)
-
setThreadName
protected void setThreadName(M message)
-
-