|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.grizzly.util.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 |
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 |
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. |
| 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 final void setMaxSelectors(int size)
throws IOException
size - max pool size
IOException
public static final void changeSelectorsBy(int delta)
throws IOException
delta -
IOExceptionpublic static final int getMaxSelectors()
public static final Selector getSelector()
Selector
Selectorpublic static final void returnSelector(Selector s)
Selector to the cache
s - Selectorpublic static final void selectNowAndReturnSelector(Selector s)
Selector.selectNow() and returns
the Selector to the cache
public static final void reimburseSelector()
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||