SelectorHandler
| Modifier and Type | Class and Description |
|---|---|
| protected static class | |
| protected static class | |
| protected static class | |
| protected static class |
| Modifier and Type | Field and Description |
|---|---|
| private static final long | |
| public static final boolean | |
| private static final Logger | |
| protected final long | |
| private static final int | SPIN_RATE_THRESHOLD
The threshold for detecting selector.select spin on linux, used for enabling workaround to prevent server from hanging. |
| Access | Constructor and Description |
|---|---|
| public | |
| public |
| DEFAULT_SELECT_TIMEOUT_MILLIS | back to summary |
|---|---|
| private static final long DEFAULT_SELECT_TIMEOUT_MILLIS | |
| IS_WORKAROUND_SELECTOR_SPIN | back to summary |
|---|---|
| public static final boolean IS_WORKAROUND_SELECTOR_SPIN | |
| logger | back to summary |
|---|---|
| private static final Logger logger | |
| selectTimeout | back to summary |
|---|---|
| protected final long selectTimeout | |
| SPIN_RATE_THRESHOLD | back to summary |
|---|---|
| private static final int SPIN_RATE_THRESHOLD The threshold for detecting selector.select spin on linux, used for enabling workaround to prevent server from hanging. | |
| DefaultSelectorHandler | back to summary |
|---|---|
| public DefaultSelectorHandler() | |
| DefaultSelectorHandler | back to summary |
|---|---|
| public DefaultSelectorHandler(final long selectTimeout, final TimeUnit timeunit) | |
| addPendingTask | back to summary |
|---|---|
| private void addPendingTask(final SelectorRunner selectorRunner, final SelectorHandlerTask task) | |
| deregisterChannel | back to summary |
|---|---|
| public void deregisterChannel(final SelectorRunner selectorRunner, final SelectableChannel channel) throws IOException Implements org. Doc from org. Deregister the channel from the
| |
| deregisterChannel0 | back to summary |
|---|---|
| private static void deregisterChannel0(final SelectorRunner selectorRunner, final SelectableChannel channel, final CompletionHandler<RegisterChannelResult> completionHandler) | |
| deregisterChannelAsync | back to summary |
|---|---|
| public void deregisterChannelAsync(final SelectorRunner selectorRunner, final SelectableChannel channel, final CompletionHandler<RegisterChannelResult> completionHandler) Implements org. Doc from org. Deregister the channel from the
| |
| deregisterKeyInterest | back to summary |
|---|---|
| public void deregisterKeyInterest(final SelectorRunner selectorRunner, final SelectionKey key, final int interest) throws IOException Implements org. Doc from org. Deregisters SelectionKey interest. This method must be called from the SelectorRunner's thread only!
| |
| enque | back to summary |
|---|---|
| public void enque(final SelectorRunner selectorRunner, final SelectorHandler. Implements org. Doc from org. Execute task in a selector thread. Unlike
| |
| execute | back to summary |
|---|---|
| public void execute(final SelectorRunner selectorRunner, final SelectorHandler. Implements org. Doc from org. Execute task in a selector thread. Unlike
| |
| failChannelRegistration | back to summary |
|---|---|
| private static void failChannelRegistration(final CompletionHandler<RegisterChannelResult> completionHandler, final Throwable error) | |
| getSelectTimeout | back to summary |
|---|---|
| public long getSelectTimeout() Implements org.
| |
| isSelectorRunnerThread | back to summary |
|---|---|
| private static boolean isSelectorRunnerThread(final SelectorRunner selectorRunner) | |
| onSelectorClosed | back to summary |
|---|---|
| public boolean onSelectorClosed(final SelectorRunner selectorRunner) Implements org.
| |
| postSelect | back to summary |
|---|---|
| public void postSelect(final SelectorRunner selectorRunner) throws IOException Implements org.
| |
| preSelect | back to summary |
|---|---|
| public boolean preSelect(final SelectorRunner selectorRunner) throws IOException Implements org.
| |
| processPendingTaskQueue | back to summary |
|---|---|
| private boolean processPendingTaskQueue(final SelectorRunner selectorRunner, final Queue<SelectorHandlerTask> selectorHandlerTasks) throws IOException | |
| processPendingTasks | back to summary |
|---|---|
| private boolean processPendingTasks(final SelectorRunner selectorRunner) throws IOException | |
| registerChannel | back to summary |
|---|---|
| public void registerChannel(final SelectorRunner selectorRunner, final SelectableChannel channel, final int interest, final Object attachment) throws IOException Implements org.
| |
| registerChannel0 | back to summary |
|---|---|
| private static void registerChannel0(final SelectorRunner selectorRunner, final SelectableChannel channel, final int interest, final Object attachment, final CompletionHandler<RegisterChannelResult> completionHandler) | |
| registerChannelAsync | back to summary |
|---|---|
| public void registerChannelAsync(SelectorRunner selectorRunner, SelectableChannel channel, int interest, Object attachment, CompletionHandler<RegisterChannelResult> completionHandler) Implements org.
| |
| registerKey0 | back to summary |
|---|---|
| private static void registerKey0(final SelectionKey selectionKey, final int interest) | |
| registerKeyInterest | back to summary |
|---|---|
| public void registerKeyInterest(final SelectorRunner selectorRunner, final SelectionKey key, final int interest) throws IOException Implements org.
| |
| select | back to summary |
|---|---|
| public Set Implements org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final SelectableChannel | |
| private final CompletionHandler |
| Access | Constructor and Description |
|---|---|
| private | DeregisterChannelOperation(final SelectableChannel channel, final CompletionHandler<RegisterChannelResult> completionHandler)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | run(final SelectorRunner selectorRunner)
Implements org.
|
| channel | back to summary |
|---|---|
| private final SelectableChannel channel | |
| completionHandler | back to summary |
|---|---|
| private final CompletionHandler<RegisterChannelResult> completionHandler | |
| DeregisterChannelOperation | back to summary |
|---|---|
| private DeregisterChannelOperation(final SelectableChannel channel, final CompletionHandler<RegisterChannelResult> completionHandler) | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements org.
| |
| run | back to summary |
|---|---|
| public boolean run(final SelectorRunner selectorRunner) throws IOException Implements org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final Object | |
| private final SelectableChannel | |
| private final CompletionHandler | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private | RegisterChannelOperation(final SelectableChannel channel, final int interest, final Object attachment, final CompletionHandler<RegisterChannelResult> completionHandler)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | run(final SelectorRunner selectorRunner)
Implements org.
|
| attachment | back to summary |
|---|---|
| private final Object attachment | |
| channel | back to summary |
|---|---|
| private final SelectableChannel channel | |
| completionHandler | back to summary |
|---|---|
| private final CompletionHandler<RegisterChannelResult> completionHandler | |
| interest | back to summary |
|---|---|
| private final int interest | |
| RegisterChannelOperation | back to summary |
|---|---|
| private RegisterChannelOperation(final SelectableChannel channel, final int interest, final Object attachment, final CompletionHandler<RegisterChannelResult> completionHandler) | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements org.
| |
| run | back to summary |
|---|---|
| public boolean run(final SelectorRunner selectorRunner) throws IOException Implements org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final SelectionKey |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | run(final SelectorRunner selectorRunner)
Implements org.
|
| interest | back to summary |
|---|---|
| private final int interest | |
| selectionKey | back to summary |
|---|---|
| private final SelectionKey selectionKey | |
| RegisterKeyTask | back to summary |
|---|---|
| public RegisterKeyTask(final SelectionKey selectionKey, final int interest) | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements org.
| |
| run | back to summary |
|---|---|
| public boolean run(final SelectorRunner selectorRunner) throws IOException Implements org.
| |
| Modifier and Type | Field and Description |
|---|---|
| private final CompletionHandler | |
| private final SelectorHandler. |
| Access | Constructor and Description |
|---|---|
| private | RunnableTask(final SelectorHandler.
|
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public boolean | run(final SelectorRunner selectorRunner)
Implements org.
|
| completionHandler | back to summary |
|---|---|
| private final CompletionHandler<SelectorHandler. | |
| task | back to summary |
|---|---|
| private final SelectorHandler. | |
| RunnableTask | back to summary |
|---|---|
| private RunnableTask(final SelectorHandler. | |
| cancel | back to summary |
|---|---|
| public void cancel() Implements org.
| |
| run | back to summary |
|---|---|
| public boolean run(final SelectorRunner selectorRunner) throws IOException Implements org.
| |