public class ConsumerPool<M extends Message> extends AbstractCallablePool<ConsumerStatus>
AbstractCallablePool.NamedThreadFactory
Constructor and Description |
---|
ConsumerPool(String mqName,
MQManager<M> manager,
ConsumerFactory<M> factory,
ConsumerPolicy policy) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterCall(List<ConsumerStatus> ret) |
void |
close() |
protected static short |
computeNbThreads(short maxConcurrency,
short maxThreads) |
protected Callable<ConsumerStatus> |
getCallable(int i) |
String |
getConsumerGroupName() |
protected ConsumerStatus |
getErrorStatus()
Value to return when there was an exception during execution
|
protected String |
getThreadPrefix() |
getNbThreads, runPool, start
public ConsumerPool(String mqName, MQManager<M> manager, ConsumerFactory<M> factory, ConsumerPolicy policy)
protected static short computeNbThreads(short maxConcurrency, short maxThreads)
public String getConsumerGroupName()
protected ConsumerStatus getErrorStatus()
AbstractCallablePool
getErrorStatus
in class AbstractCallablePool<ConsumerStatus>
protected Callable<ConsumerStatus> getCallable(int i)
getCallable
in class AbstractCallablePool<ConsumerStatus>
protected String getThreadPrefix()
getThreadPrefix
in class AbstractCallablePool<ConsumerStatus>
protected void afterCall(List<ConsumerStatus> ret)
afterCall
in class AbstractCallablePool<ConsumerStatus>
public void close() throws Exception
close
in interface AutoCloseable
close
in class AbstractCallablePool<ConsumerStatus>
Exception
Copyright © 2017 Nuxeo. All rights reserved.