public class SelectorThreadPool extends Object
SelectoThread
s increasing the pool when required
and always maintaining the minimum number of permanent threads required.Constructor and Description |
---|
SelectorThreadPool(SelectorThreadImpl impl,
int permanentThreads,
int maximumChannels,
int idleServicePeriod,
int inactivePeriodsPerIdleEvent,
SelectorProvider selectorProvider)
Construct a thread pool.
|
Modifier and Type | Method and Description |
---|---|
void |
closeAllChannels() |
int |
getCurrentLoad() |
SelectorThread |
selectNextThread()
Select the next available thread with the minimum load.
|
void |
shutdown()
Shutdown all threads in the pool.
|
public SelectorThreadPool(SelectorThreadImpl impl, int permanentThreads, int maximumChannels, int idleServicePeriod, int inactivePeriodsPerIdleEvent, SelectorProvider selectorProvider) throws IOException
impl
- SelectorThreadImplpermanentThreads
- intmaximumChannels
- intidleServicePeriod
- intinactivePeriodsPerIdleEvent
- intselectorProvider
- SelectorProviderIOException
public void closeAllChannels()
public void shutdown()
public int getCurrentLoad()
public SelectorThread selectNextThread() throws IOException
IOException
Copyright © 2016. All rights reserved.