public class SelectorFactory
extends java.lang.Object
Selector
.Modifier and Type | Field and Description |
---|---|
static int |
MAX_ATTEMPTS
The number of attempts to find an available selector.
|
static int |
MAX_SELECTORS
The maximum number of
Selector to create. |
static long |
TIMEOUT
The timeout before we exit.
|
Constructor and Description |
---|
SelectorFactory() |
Modifier and Type | Method and Description |
---|---|
static java.nio.channels.Selector |
getSelector()
Get an exclusive
Selector . |
static void |
returnSelector(java.nio.channels.Selector selector)
Returns the
Selector to the cache. |
public static final int MAX_SELECTORS
Selector
to create.public static final int MAX_ATTEMPTS
public static final long TIMEOUT
public static final java.nio.channels.Selector getSelector()
Selector
.Selector
.public static final void returnSelector(java.nio.channels.Selector selector)
Selector
to the cache.selector
- The Selector
to return.Copyright © 2005-2020 Restlet.