| Modifier and Type | Field and Description |
|---|---|
| private final int | |
| private final EventFD | |
| private final Map | |
| private final Object | |
| private boolean | |
| private static final int | |
| private final long | |
| private final Deque | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| protected int | doSelect(Consumer<SelectionKey> action, long timeout)
Implements abstract sun. Selects the keys for channels that are ready for I/O operations. |
| protected void | implClose()
Implements abstract sun. Invoked by implCloseSelector to close the selector. |
| protected void | implDereg(SelectionKeyImpl ski)
Implements abstract sun. Removes the key from the selector |
| private int | |
| private void | |
| public void | setEventOps(SelectionKeyImpl ski)
Implements abstract sun. Invoked by interestOps to ensure the interest ops are updated at the next selection operation. |
| private int | timedPoll(long nanos)
Parks the current virtual thread until a file descriptor is polled, or the thread is interrupted, for up to the specified waiting time. |
| private int | untimedPoll(boolean block)
If blocking, parks the current virtual thread until a file descriptor is polled or the thread is interrupted. |
| public Selector | wakeup()
Implements abstract java. Causes the first selection operation that has not yet returned to return immediately. |
| epfd | back to summary |
|---|---|
| private final int epfd | |
| eventfd | back to summary |
|---|---|
| private final EventFD eventfd | |
| fdToKey | back to summary |
|---|---|
| private final Map<Integer, SelectionKeyImpl> fdToKey | |
| interruptLock | back to summary |
|---|---|
| private final Object interruptLock | |
| interruptTriggered | back to summary |
|---|---|
| private boolean interruptTriggered | |
| NUM_EPOLLEVENTS | back to summary |
|---|---|
| private static final int NUM_EPOLLEVENTS | |
| pollArrayAddress | back to summary |
|---|---|
| private final long pollArrayAddress | |
| updateKeys | back to summary |
|---|---|
| private final Deque<SelectionKeyImpl> updateKeys | |
| updateLock | back to summary |
|---|---|
| private final Object updateLock | |
| EPollSelectorImpl | back to summary |
|---|---|
| pack-priv EPollSelectorImpl(SelectorProvider sp) throws IOException | |
| clearInterrupt | back to summary |
|---|---|
| private void clearInterrupt() throws IOException | |
| doSelect | back to summary |
|---|---|
| protected int doSelect(Consumer<SelectionKey> action, long timeout) throws IOException Implements abstract sun. Doc from sun. Selects the keys for channels that are ready for I/O operations.
| |
| implClose | back to summary |
|---|---|
| protected void implClose() throws IOException Implements abstract sun. Doc from sun. Invoked by implCloseSelector to close the selector.
| |
| implDereg | back to summary |
|---|---|
| protected void implDereg(SelectionKeyImpl ski) throws IOException Implements abstract sun. Doc from sun. Removes the key from the selector
| |
| processEvents | back to summary |
|---|---|
| private int processEvents(int numEntries, Consumer<SelectionKey> action) throws IOException Process the polled events. If the interrupt fd has been selected, drain it and clear the interrupt. | |
| processUpdateQueue | back to summary |
|---|---|
| private void processUpdateQueue() Process changes to the interest ops. | |
| setEventOps | back to summary |
|---|---|
| public void setEventOps(SelectionKeyImpl ski) Implements abstract sun. Doc from sun. Invoked by interestOps to ensure the interest ops are updated at the next selection operation.
| |
| timedPoll | back to summary |
|---|---|
| private int timedPoll(long nanos) throws IOException Parks the current virtual thread until a file descriptor is polled, or the thread is interrupted, for up to the specified waiting time. | |
| untimedPoll | back to summary |
|---|---|
| private int untimedPoll(boolean block) throws IOException If blocking, parks the current virtual thread until a file descriptor is polled or the thread is interrupted. | |
| wakeup | back to summary |
|---|---|
| public Selector wakeup() Implements abstract java. Doc from java. Causes the first selection operation that has not yet returned to return immediately. If another thread is currently blocked in a selection operation then
that invocation will return immediately. If no selection operation is
currently in progress then the next invocation of a selection operation
will return immediately unless Invoking this method more than once between two successive selection operations has the same effect as invoking it just once.
| |