Home / Function/ processSelectedKeysOptimized() — netty Function Reference

processSelectedKeysOptimized() — netty Function Reference

Architecture documentation for the processSelectedKeysOptimized() function in NioIoHandler.java from the netty codebase.

Function java Buffer Search calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  e3fcb994_a327_a559_b40a_d6d5470f3507["processSelectedKeysOptimized()"]
  db526e28_8aae_a182_b56b_dc12824d89f5["NioIoHandler"]
  e3fcb994_a327_a559_b40a_d6d5470f3507 -->|defined in| db526e28_8aae_a182_b56b_dc12824d89f5
  bb59a7a2_77ef_52ff_0c57_820c55b1ec5b["processSelectedKeys()"]
  bb59a7a2_77ef_52ff_0c57_820c55b1ec5b -->|calls| e3fcb994_a327_a559_b40a_d6d5470f3507
  aca109d8_122e_b26d_bc0c_7282ec7c38da["processSelectedKey()"]
  e3fcb994_a327_a559_b40a_d6d5470f3507 -->|calls| aca109d8_122e_b26d_bc0c_7282ec7c38da
  0da770a6_c2c1_ab83_acae_aaaf42049c37["selectAgain()"]
  e3fcb994_a327_a559_b40a_d6d5470f3507 -->|calls| 0da770a6_c2c1_ab83_acae_aaaf42049c37
  style e3fcb994_a327_a559_b40a_d6d5470f3507 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/nio/NioIoHandler.java lines 563–584

    private int processSelectedKeysOptimized() {
        int handled = 0;
        for (int i = 0; i < selectedKeys.size; ++i) {
            final SelectionKey k = selectedKeys.keys[i];
            // null out entry in the array to allow to have it GC'ed once the Channel close
            // See https://github.com/netty/netty/issues/2363
            selectedKeys.keys[i] = null;

            processSelectedKey(k);
            ++handled;

            if (needsToSelectAgain) {
                // null out entries in the array to allow to have it GC'ed once the Channel close
                // See https://github.com/netty/netty/issues/2363
                selectedKeys.reset(i + 1);

                selectAgain();
                i = -1;
            }
        }
        return handled;
    }

Domain

Subdomains

Frequently Asked Questions

What does processSelectedKeysOptimized() do?
processSelectedKeysOptimized() is a function in the netty codebase, defined in transport/src/main/java/io/netty/channel/nio/NioIoHandler.java.
Where is processSelectedKeysOptimized() defined?
processSelectedKeysOptimized() is defined in transport/src/main/java/io/netty/channel/nio/NioIoHandler.java at line 563.
What does processSelectedKeysOptimized() call?
processSelectedKeysOptimized() calls 2 function(s): processSelectedKey, selectAgain.
What calls processSelectedKeysOptimized()?
processSelectedKeysOptimized() is called by 1 function(s): processSelectedKeys.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free