java.nio.channels.SelectionKey s, which were selected last time by
java.nio.channels.Selector .
SimpleDynamicIOStrategy is able to use 2 strategies underneath: SameThreadIOStrategy,
WorkerThreadIOStrategy. And is able to switch between them basing on corresponding threshold (threshold
represents the number of selected java.nio.channels.SelectionKey s).
So the strategy is getting applied following way:
SameThreadIOStrategy --(worker-thread threshold)--> WorkerThreadIOStrategy.
| Modifier and Type | Field and Description |
|---|---|
| private static final SimpleDynamicNIOStrategy | |
| private final SameThreadIOStrategy | |
| private static final int | |
| private final WorkerThreadIOStrategy |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public ThreadPoolConfig | |
| public boolean | executeIoEvent(Connection<L> connection, IOEvent ioEvent)
Implements org. The |
| public boolean | executeIoEvent(final Connection<L> connection, final IOEvent ioEvent, final boolean isIoEventEnabled)
Implements org. The |
| public static SimpleDynamicNIOStrategy | |
| private static int | |
| public Executor | getThreadPoolFor(final Connection<L> connection, final IOEvent ioEvent)
Implements org. Returns an |
| INSTANCE | back to summary |
|---|---|
| private static final SimpleDynamicNIOStrategy INSTANCE | |
| sameThreadStrategy | back to summary |
|---|---|
| private final SameThreadIOStrategy sameThreadStrategy | |
| WORKER_THREAD_THRESHOLD | back to summary |
|---|---|
| private static final int WORKER_THREAD_THRESHOLD | |
| workerThreadStrategy | back to summary |
|---|---|
| private final WorkerThreadIOStrategy workerThreadStrategy | |
| SimpleDynamicNIOStrategy | back to summary |
|---|---|
| private SimpleDynamicNIOStrategy() | |
| createDefaultWorkerPoolConfig | back to summary |
|---|---|
| public ThreadPoolConfig createDefaultWorkerPoolConfig(final Transport transport) Implements org.
| |
| executeIoEvent | back to summary |
|---|---|
| public boolean executeIoEvent(Connection<L> connection, IOEvent ioEvent) throws IOException Implements org. Doc from org. The
| |
| executeIoEvent | back to summary |
|---|---|
| public boolean executeIoEvent(final Connection<L> connection, final IOEvent ioEvent, final boolean isIoEventEnabled) throws IOException Implements org. Doc from org. The
| |
| getInstance | back to summary |
|---|---|
| public static SimpleDynamicNIOStrategy getInstance() | |
| getLastSelectedKeysCount | back to summary |
|---|---|
| private static int getLastSelectedKeysCount(final Connection<L> c) | |
| getThreadPoolFor | back to summary |
|---|---|
| public Executor getThreadPoolFor(final Connection<L> connection, final IOEvent ioEvent) Implements org. Doc from org. Returns an
| |