public class ThreadPoolConfiguration extends java.lang.Object implements Configuration
Configuration
interface. Can be
used by clients to configure NERV subscriptions to use multiple threads for
processing inbound events to improve the overall performance of a consumer.DURABLE_SUBSCRIPTION, FILTER, IDEMPOTENT_CONSUMER, ORDERING, SERVER_SIDE_FILTER, THREAD_POOL
Constructor and Description |
---|
ThreadPoolConfiguration(int poolSize,
int maxPoolSize,
java.lang.String threadName)
Constructs an object based on the provided parameters.
|
Modifier and Type | Method and Description |
---|---|
int |
getMaxPoolSize()
Gives access to the maximum size of the pool to be used by NERV.
|
int |
getPoolSize()
Gives access to the initial size of the pool to be used by NERV.
|
java.lang.String |
getThreadName()
Gives access to the template name used by NERV when processing threads
are spawned.
|
int |
getType()
Returns the configuration type represented as an integer
|
public ThreadPoolConfiguration(int poolSize, int maxPoolSize, java.lang.String threadName)
poolSize
- - The initial size of the pool.maxPoolSize
- - The maximum size of the pool. It should always be greater
than or equal to the initial pool size. If the client
specifies a maximum size that is less than the initial one,
the configuration will override it and set the initial pool
size as maximum. For example if the client sets pool size to 5
and maximum pool size to 2, NERV will overwrite it and set the
maximum size to 5.threadName
- - A name template for creating processing threads.public int getPoolSize()
public int getMaxPoolSize()
public java.lang.String getThreadName()
public int getType()
Configuration
getType
in interface Configuration