public class SelectorFactory extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
DEFAULT_MAX_SELECTORS |
static long |
timeout
The timeout before we exit.
|
| Constructor and Description |
|---|
SelectorFactory() |
| Modifier and Type | Method and Description |
|---|---|
static int |
getMaxSelectors()
Returns max selector pool size
|
static Selector |
getSelector()
Get a exclusive
Selector |
static void |
returnSelector(Selector s)
Return the
Selector to the cache |
static void |
setMaxSelectors(int size)
Set max selector pool size.
|
public static final int DEFAULT_MAX_SELECTORS
public static final long timeout
public static final void setMaxSelectors(int size)
throws IOException
size - max pool sizeIOExceptionpublic static final int getMaxSelectors()
public static final Selector getSelector()
SelectorSelectorpublic static final void returnSelector(Selector s)
Selector to the caches - SelectorCopyright © 2016. All rights reserved.