|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.enterprise.web.connector.grizzly.SelectorFactory
public class SelectorFactory
Factory used to dispatch/share Selector.
| Field Summary | |
|---|---|
static int |
DEFAULT_MAX_SELECTORS
|
| Constructor Summary | |
|---|---|
SelectorFactory()
|
|
| Method Summary | |
|---|---|
static void |
changeSelectorsBy(int delta)
Changes the Selector cache size |
protected static Selector |
createSelector()
Creeate Selector |
static int |
getMaxSelectors()
Returns max selector pool size |
static Selector |
getSelector()
Please ensure to use try finally around get and return of selector so avoid leaks. |
static long |
getTimeout(TimeUnit timeUnit)
|
static void |
reimburseSelector()
Add Selector to the cache. |
static void |
returnSelector(Selector s)
Please ensure to use try finally around get and return of selector so avoid leaks. |
static void |
selectNowAndReturnSelector(Selector s)
Executes Selector.selectNow() and returns
the Selector to the cache |
static void |
setMaxSelectors(int size)
Set max selector pool size. |
static void |
setTimeout(long timeout,
TimeUnit timeUnit)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int DEFAULT_MAX_SELECTORS
| Constructor Detail |
|---|
public SelectorFactory()
| Method Detail |
|---|
public static void setMaxSelectors(int size)
throws IOException
size - max pool size
IOException
public static void changeSelectorsBy(int delta)
throws IOException
delta -
IOExceptionpublic static int getMaxSelectors()
public static Selector getSelector()
Selector
Selectorpublic static void returnSelector(Selector s)
Selector to the cache
s - Selectorpublic static void selectNowAndReturnSelector(Selector s)
Selector.selectNow() and returns
the Selector to the cache
public static void reimburseSelector()
throws IOException
IOException
protected static Selector createSelector()
throws IOException
IOExceptionpublic static long getTimeout(TimeUnit timeUnit)
public static void setTimeout(long timeout,
TimeUnit timeUnit)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||