Home / Type/ SelectStrategy Type — netty Architecture

SelectStrategy Type — netty Architecture

Architecture documentation for the SelectStrategy type/interface in SelectStrategy.java from the netty codebase.

Entity Profile

Dependency Diagram

graph TD
  d593f5c7_4c19_3e4b_1a46_107c635c043d["SelectStrategy"]
  6505c879_a74d_cfdf_5d9f_055d9affa351["SelectStrategy.java"]
  d593f5c7_4c19_3e4b_1a46_107c635c043d -->|defined in| 6505c879_a74d_cfdf_5d9f_055d9affa351
  style d593f5c7_4c19_3e4b_1a46_107c635c043d fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

transport/src/main/java/io/netty/channel/SelectStrategy.java lines 26–52

public interface SelectStrategy {

    /**
     * Indicates a blocking select should follow.
     */
    int SELECT = -1;
    /**
     * Indicates the IO loop should be retried, no blocking select to follow directly.
     */
    int CONTINUE = -2;
    /**
     * Indicates the IO loop to poll for new events without blocking.
     */
    int BUSY_WAIT = -3;

    /**
     * The {@link SelectStrategy} can be used to steer the outcome of a potential select
     * call.
     *
     * @param selectSupplier The supplier with the result of a select result.
     * @param hasTasks true if tasks are waiting to be processed.
     * @return {@link #SELECT} if the next step should be blocking select {@link #CONTINUE} if
     *         the next step should be to not select but rather jump back to the IO loop and try
     *         again. Any value >= 0 is treated as an indicator that work needs to be done.
     */
    int calculateStrategy(IntSupplier selectSupplier, boolean hasTasks) throws Exception;
}

Frequently Asked Questions

What is the SelectStrategy type?
SelectStrategy is a type/interface in the netty codebase, defined in transport/src/main/java/io/netty/channel/SelectStrategy.java.
Where is SelectStrategy defined?
SelectStrategy is defined in transport/src/main/java/io/netty/channel/SelectStrategy.java at line 26.

Analyze Your Own Codebase

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

Try Supermodel Free