|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.util.SelectorFactory
public final class SelectorFactory
Factory used to dispatch/share Selector.
| Field Summary | |
|---|---|
static int |
DEFAULT_MAX_SELECTORS
|
| Constructor Summary | |
|---|---|
SelectorFactory()
|
|
| Method Summary | |
|---|---|
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 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. |
| 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)
size - max pool sizepublic 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||