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.
|
SelectorThreadPool(SelectorThreadImpl impl,
int permanentThreads,
int maximumChannels,
int idleServicePeriod,
int inactivePeriodsPerIdleEvent,
SelectorProvider selectorProvider,
int threadPriority) |
Modifier and Type | Method and Description |
---|---|
void |
closeAllChannels() |
int |
getCurrentLoad() |
boolean |
isShuttingDown() |
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 SelectorThreadPool(SelectorThreadImpl impl, int permanentThreads, int maximumChannels, int idleServicePeriod, int inactivePeriodsPerIdleEvent, SelectorProvider selectorProvider, int threadPriority) throws IOException
IOException
public void closeAllChannels()
public void shutdown()
public boolean isShuttingDown()
public int getCurrentLoad()
public SelectorThread selectNextThread() throws IOException
IOException
Copyright © 2024. All rights reserved.