| Modifier and Type | Field and Description |
|---|---|
| private static final short | |
| private final int | |
| private final int | |
| private static final short | |
| private static final int | |
| private final Object | |
| private boolean | |
| private AllocatedNativeObject | |
| private int | |
| private int | |
| private final List | |
| private static final short | |
| private static final short | |
| private final Deque | |
| private final Object |
| Access | Constructor and Description |
|---|---|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| private void | add(SelectionKeyImpl ski, int ops)
Adds a pollfd entry to the poll array, expanding the poll array if needed. |
| 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. |
| private void | |
| private void | |
| private int | |
| private int | |
| private int | |
| 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 |
| protected void | implRegister(SelectionKeyImpl ski)
Overrides sun. Register the key in the selector. |
| private static native int | |
| private int | |
| private void | |
| private void | |
| private void | |
| private void | |
| 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 void | |
| private void | |
| public Selector | wakeup()
Implements abstract java. Causes the first selection operation that has not yet returned to return immediately. |
| EVENT_OFFSET | back to summary |
|---|---|
| private static final short EVENT_OFFSET | |
| fd0 | back to summary |
|---|---|
| private final int fd0 | |
| fd1 | back to summary |
|---|---|
| private final int fd1 | |
| FD_OFFSET | back to summary |
|---|---|
| private static final short FD_OFFSET | |
| INITIAL_CAPACITY | back to summary |
|---|---|
| private static final int INITIAL_CAPACITY | |
| interruptLock | back to summary |
|---|---|
| private final Object interruptLock | |
| interruptTriggered | back to summary |
|---|---|
| private boolean interruptTriggered | |
| pollArray | back to summary |
|---|---|
| private AllocatedNativeObject pollArray | |
| pollArrayCapacity | back to summary |
|---|---|
| private int pollArrayCapacity | |
| pollArraySize | back to summary |
|---|---|
| private int pollArraySize | |
| pollKeys | back to summary |
|---|---|
| private final List<SelectionKeyImpl> pollKeys | |
| REVENT_OFFSET | back to summary |
|---|---|
| private static final short REVENT_OFFSET | |
| SIZE_POLLFD | back to summary |
|---|---|
| private static final short SIZE_POLLFD | |
| updateKeys | back to summary |
|---|---|
| private final Deque<SelectionKeyImpl> updateKeys | |
| updateLock | back to summary |
|---|---|
| private final Object updateLock | |
| PollSelectorImpl | back to summary |
|---|---|
| pack-priv PollSelectorImpl(SelectorProvider sp) throws IOException | |
| add | back to summary |
|---|---|
| private void add(SelectionKeyImpl ski, int ops) Adds a pollfd entry to the poll array, expanding the poll array if needed. | |
| 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.
| |
| ensureOpen | back to summary |
|---|---|
| private void ensureOpen() | |
| expandIfNeeded | back to summary |
|---|---|
| private void expandIfNeeded() Expand poll array if at capacity | |
| getDescriptor | back to summary |
|---|---|
| private int getDescriptor(int i) | |
| getEventOps | back to summary |
|---|---|
| private int getEventOps(int i) | |
| getReventOps | back to summary |
|---|---|
| private int getReventOps(int i) | |
| 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
| |
| implRegister | back to summary |
|---|---|
| protected void implRegister(SelectionKeyImpl ski) Overrides sun. Doc from sun. Register the key in the selector. The default implementation checks if the selector is open. It should be overridden by selector implementations as needed.
| |
| poll | back to summary |
|---|---|
| private static native int poll(long pollAddress, int numfds, int timeout) | |
| processEvents | back to summary |
|---|---|
| private int processEvents(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. | |
| putDescriptor | back to summary |
|---|---|
| private void putDescriptor(int i, int fd) | |
| putEventOps | back to summary |
|---|---|
| private void putEventOps(int i, int event) | |
| putReventOps | back to summary |
|---|---|
| private void putReventOps(int i, int revent) | |
| remove | back to summary |
|---|---|
| private void remove(SelectionKeyImpl ski) Removes a pollfd entry from the poll array | |
| 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.
| |
| setFirst | back to summary |
|---|---|
| private void setFirst(int fd, int ops) Sets the first pollfd entry in the poll array to the given fd | |
| update | back to summary |
|---|---|
| private void update(SelectionKeyImpl ski, int ops) Update the events of pollfd entry. | |
| 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.
| |