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>appenderprotected longcounterprotected ProducerFactory<M>factoryprotected intproducerIdprotected io.dropwizard.metrics5.CounterproducersCountprotected io.dropwizard.metrics5.TimerproducerTimerprotected io.dropwizard.metrics5.MetricRegistryregistryprotected StringthreadName
-
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 ProducerStatuscall()protected voidproducerLoop(ProducerIterator<M> producer)protected voidsetThreadName(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)
-
-