Interface ThreadsConfig
- All Superinterfaces:
- Config
Configuration of Thread Related Information.
 
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.
- Since:
- 4.4
- 
Method SummaryModifier and TypeMethodDescriptionAdd a new thread pool definition.intReturns the size of the background thread pool.Gets the inbound thread pool definition name.Returns a named thread pool configuration.getPools()Get the list of thread pool definitions.voidsetBackgroundPoolSize(int size) Sets the number of threads to use for the background thread pool.voidsetInboundPool(String poolDefinition) Sets the thread pool definition to use for the inbound thread pool.
- 
Method Details- 
setInboundPoolSets the thread pool definition to use for the inbound thread pool.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. - Parameters:
- poolDefinition- the inbound thread pool definition
- Throws:
- ConfigException- if unable to set the property
 
- 
getInboundPoolString getInboundPool()Gets the inbound thread pool definition name.The inbound pool configuration can be retrieved with getPool(String)using the result of this method.Only the size sizeandqueue sizeparameters are used to configure the inbound thread pool used by Diffusion. All other parameters are ignored.- Returns:
- definition name or null if not set.
 
- 
setBackgroundPoolSizeSets the number of threads to use for the background thread pool.If this is not specified then 10 is assumed. - Parameters:
- size- the number of threads in the background thread pool
- Throws:
- ConfigException- if unable to set the background pool size
 
- 
getBackgroundPoolSizeint getBackgroundPoolSize()Returns the size of the background thread pool.- Returns:
- background thread pool size
 
- 
getPoolsList<ThreadPoolConfig> getPools()Get the list of thread pool definitions.- Returns:
- list of thread pool definitions which can be empty if none defined.
 
- 
addPoolAdd a new thread pool definition.- Parameters:
- name- the name of the definition
- Returns:
- the new thread pool configuration
- Throws:
- ConfigException- if unable to add a new thread pool of the given name.
 
- 
getPoolReturns a named thread pool configuration.- Parameters:
- name- the thread pool definition name
- Returns:
- the named thread pool definition or null if no definition with the given name exists
 
 
-