Class ConsumerPool<M extends Message>
java.lang.Object
org.nuxeo.lib.stream.pattern.consumer.internals.AbstractCallablePool<ConsumerStatus>
org.nuxeo.lib.stream.pattern.consumer.ConsumerPool<M>
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
DocumentConsumerPool
Run a pool of ConsumerRunner.
- Since:
- 9.1
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<List<LogPartition>> protected final ConsumerFactory<M> protected final Stringprotected final LogManagerprotected final ConsumerPolicyFields inherited from class org.nuxeo.lib.stream.pattern.consumer.internals.AbstractCallablePool
nbThreads, supplyThreadPool, threadPool -
Constructor Summary
ConstructorsConstructorDescriptionConsumerPool(String logName, LogManager manager, Codec<M> codec, ConsumerFactory<M> factory, ConsumerPolicy policy) ConsumerPool(String logName, LogManager manager, ConsumerFactory<M> factory, ConsumerPolicy policy) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidafterCall(List<ConsumerStatus> ret) protected static shortcomputeNbThreads(short maxConcurrency, short maxThreads) protected Callable<ConsumerStatus> getCallable(int i) protected List<List<LogPartition>> protected ConsumerStatusValue to return when there was an exception during executionprotected StringMethods inherited from class org.nuxeo.lib.stream.pattern.consumer.internals.AbstractCallablePool
close, getNbThreads, runPool, start
-
Field Details
-
logName
-
manager
-
codec
-
factory
-
policy
-
defaultAssignments
-
-
Constructor Details
-
ConsumerPool
@Deprecated public ConsumerPool(String logName, LogManager manager, ConsumerFactory<M> factory, ConsumerPolicy policy) Deprecated.since 11.1, due to serialization issue with java 11, useConsumerPool(String, LogManager, Codec, ConsumerFactory, ConsumerPolicy)which allows to give acodectotailer. -
ConsumerPool
public ConsumerPool(String logName, LogManager manager, Codec<M> codec, ConsumerFactory<M> factory, ConsumerPolicy policy)
-
-
Method Details
-
computeNbThreads
protected static short computeNbThreads(short maxConcurrency, short maxThreads) -
getConsumerGroupName
-
getErrorStatus
Description copied from class:AbstractCallablePoolValue to return when there was an exception during execution- Specified by:
getErrorStatusin classAbstractCallablePool<ConsumerStatus>
-
getCallable
- Specified by:
getCallablein classAbstractCallablePool<ConsumerStatus>
-
getThreadPrefix
- Specified by:
getThreadPrefixin classAbstractCallablePool<ConsumerStatus>
-
afterCall
- Specified by:
afterCallin classAbstractCallablePool<ConsumerStatus>
-
getDefaultAssignments
-
ConsumerPool(String, LogManager, Codec, ConsumerFactory, ConsumerPolicy)which allows to give acodectotailer.