public interface ThreadsConfig extends Config
At least one thread pool should be configured, however if none are configured when the server starts then a default pool called "InboundThreadPool" will be created and used as the inbound thread pool.
Modifier and Type | Method and Description |
---|---|
ThreadPoolConfig |
addPool(String name)
Add a new thread pool definition.
|
int |
getBackgroundPoolSize()
Returns the size of the background thread pool.
|
String |
getInboundPool()
Gets the inbound thread pool definition name.
|
ThreadPoolConfig |
getPool(String name)
Returns a named thread pool configuration.
|
List<ThreadPoolConfig> |
getPools()
Get the list of thread pool definitions.
|
void |
setBackgroundPoolSize(int size)
Sets the number of threads to use for the background thread pool.
|
void |
setInboundPool(String poolDefinition)
Sets the thread pool definition to use for the inbound thread pool.
|
void setInboundPool(String poolDefinition) throws ConfigException
This must represent a defined pool.
If no inbound pool is defined when required at runtime then the first pool definition will be used to define it. If there are no pool definitions then a default one will be created.
poolDefinition
- the inbound thread pool definitionConfigException
- if unable to set the propertyString getInboundPool()
The inbound pool configuration can be retrieved with
getPool(String)
using the result of this method.
From Diffusion 5.8, only the core
size
and queue size
parameters
are used to configure the inbound thread pool used by Diffusion. All
other parameters are ignored.
void setBackgroundPoolSize(int size) throws ConfigException
If this is not specified then 10 is assumed.
size
- the number of threads in the background thread poolConfigException
- if unable to set the background pool sizeint getBackgroundPoolSize()
List<ThreadPoolConfig> getPools()
ThreadPoolConfig addPool(String name) throws ConfigException
name
- the name of the definitionConfigException
- if unable to add a new thread pool of the given
name.ThreadPoolConfig getPool(String name)
name
- the thread pool definition nameCopyright © 2021 Push Technology Ltd. All Rights Reserved.