public class ProducerRunner<M extends Message> extends Object implements Callable<ProducerStatus>
Modifier and Type | Field and Description |
---|---|
protected LogAppender<M> |
appender |
protected long |
counter |
protected ProducerFactory<M> |
factory |
protected int |
producerId |
protected com.codahale.metrics.Counter |
producersCount |
protected com.codahale.metrics.Timer |
producerTimer |
protected com.codahale.metrics.MetricRegistry |
registry |
protected String |
threadName |
Constructor and Description |
---|
ProducerRunner(ProducerFactory<M> factory,
LogAppender<M> appender,
int producerId) |
Modifier and Type | Method and Description |
---|---|
ProducerStatus |
call() |
protected void |
producerLoop(ProducerIterator<M> producer) |
protected void |
setThreadName(M message) |
protected final int producerId
protected final LogAppender<M extends Message> appender
protected final ProducerFactory<M extends Message> factory
protected String threadName
protected final com.codahale.metrics.MetricRegistry registry
protected final com.codahale.metrics.Timer producerTimer
protected final com.codahale.metrics.Counter producersCount
protected long counter
public ProducerRunner(ProducerFactory<M> factory, LogAppender<M> appender, int producerId)
public ProducerStatus call() throws Exception
call
in interface Callable<ProducerStatus>
Exception
protected void producerLoop(ProducerIterator<M> producer)
protected void setThreadName(M message)
Copyright © 2018 Nuxeo. All rights reserved.