Class ProducerPool<M extends Message>
- java.lang.Object
-
- org.nuxeo.lib.stream.pattern.consumer.internals.AbstractCallablePool<ProducerStatus>
-
- org.nuxeo.lib.stream.pattern.producer.ProducerPool<M>
-
- All Implemented Interfaces:
AutoCloseable
public class ProducerPool<M extends Message> extends AbstractCallablePool<ProducerStatus>
A Pool of ProducerRunner- Since:
- 9.1
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.nuxeo.lib.stream.pattern.consumer.internals.AbstractCallablePool
AbstractCallablePool.NamedThreadFactory
-
-
Field Summary
Fields Modifier and Type Field Description protected Codec<M>codecprotected ProducerFactory<M>factoryprotected StringlogNameprotected LogManagermanager-
Fields inherited from class org.nuxeo.lib.stream.pattern.consumer.internals.AbstractCallablePool
nbThreads, supplyThreadPool, threadPool
-
-
Constructor Summary
Constructors Constructor Description ProducerPool(String logName, LogManager manager, Codec<M> codec, ProducerFactory<M> factory, short nbThreads)ProducerPool(String logName, LogManager manager, ProducerFactory<M> factory, short nbThreads)Deprecated.since 11.1, due to serialization issue with java 11, useProducerPool(String, LogManager, Codec, ProducerFactory, short)which allows to give acodectoappender.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterCall(List<ProducerStatus> ret)protected Callable<ProducerStatus>getCallable(int i)protected ProducerStatusgetErrorStatus()Value to return when there was an exception during executionprotected StringgetThreadPrefix()-
Methods inherited from class org.nuxeo.lib.stream.pattern.consumer.internals.AbstractCallablePool
close, getNbThreads, runPool, start
-
-
-
-
Constructor Detail
-
ProducerPool
@Deprecated public ProducerPool(String logName, LogManager manager, ProducerFactory<M> factory, short nbThreads)
Deprecated.since 11.1, due to serialization issue with java 11, useProducerPool(String, LogManager, Codec, ProducerFactory, short)which allows to give acodectoappender.
-
ProducerPool
public ProducerPool(String logName, LogManager manager, Codec<M> codec, ProducerFactory<M> factory, short nbThreads)
-
-
Method Detail
-
getErrorStatus
protected ProducerStatus getErrorStatus()
Description copied from class:AbstractCallablePoolValue to return when there was an exception during execution- Specified by:
getErrorStatusin classAbstractCallablePool<ProducerStatus>
-
getCallable
protected Callable<ProducerStatus> getCallable(int i)
- Specified by:
getCallablein classAbstractCallablePool<ProducerStatus>
-
getThreadPrefix
protected String getThreadPrefix()
- Specified by:
getThreadPrefixin classAbstractCallablePool<ProducerStatus>
-
afterCall
protected void afterCall(List<ProducerStatus> ret)
- Specified by:
afterCallin classAbstractCallablePool<ProducerStatus>
-
-