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>
codec
protected ProducerFactory<M>
factory
protected String
logName
protected LogManager
manager
-
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 acodec
toappender
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
afterCall(List<ProducerStatus> ret)
protected Callable<ProducerStatus>
getCallable(int i)
protected ProducerStatus
getErrorStatus()
Value to return when there was an exception during executionprotected String
getThreadPrefix()
-
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 acodec
toappender
.
-
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:AbstractCallablePool
Value to return when there was an exception during execution- Specified by:
getErrorStatus
in classAbstractCallablePool<ProducerStatus>
-
getCallable
protected Callable<ProducerStatus> getCallable(int i)
- Specified by:
getCallable
in classAbstractCallablePool<ProducerStatus>
-
getThreadPrefix
protected String getThreadPrefix()
- Specified by:
getThreadPrefix
in classAbstractCallablePool<ProducerStatus>
-
afterCall
protected void afterCall(List<ProducerStatus> ret)
- Specified by:
afterCall
in classAbstractCallablePool<ProducerStatus>
-
-