Interface SelectorThreadPoolsConfig
- All Superinterfaces:
- Config
Selector thread pools configuration.
 
This allows the user to add and retrieve pools of selector threads, and also define what the default pool should be.
By default there is a single pool of size 1 called "SelectorThreadPool" and that is the default.
- Since:
- 5.5
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringThe name of the default selector thread pool.
- 
Method SummaryModifier and TypeMethodDescriptionAdd a selector thread pool to the set of those available.Returns the name of the default selector thread pool.Returns pool definition with the given name.intReturns the total count of selector threads configured for all pools.voidsetDefaultSelectorThreadPool(String defaultPoolName) Sets the thread pool definition to use as default selector thread pool.
- 
Field Details- 
DEFAULT_NAMEThe name of the default selector thread pool.- See Also:
 
 
- 
- 
Method Details- 
setDefaultSelectorThreadPoolSets the thread pool definition to use as default selector thread pool.This must represent a defined pool. - Parameters:
- defaultPoolName- The name of the default selector thread pool
- Throws:
- ConfigException- if no pool has been defined with the given name
 
- 
addPoolAdd a selector thread pool to the set of those available.- Parameters:
- name- The name of the pool
- size- the number of threads in the pool
- Returns:
- the pool added
- Throws:
- ConfigException- if:- - name is either empty or null - - size < 1 or size > Integer.MAX_VALUE - - a pool with the given name already exists. 
 
- 
getDefaultPoolString getDefaultPool()Returns the name of the default selector thread pool.- Returns:
- the default selector thread pool name
 
- 
getPoolReturns pool definition with the given name.- Parameters:
- poolName- the selector pool's name
- Returns:
- the pool associated or null if such a pool does not exist
 
- 
getSelectorThreadCountint getSelectorThreadCount()Returns the total count of selector threads configured for all pools.- Returns:
- the count of all selector threads.
 
 
-