Repository: jenkinsci/jenkins
File: core/src/main/java/jenkins/model/IComputer.java (Java)

Code before:
    default String getIconClassName() {
        return getIcon();
    }

    /**
     * Returns the number of {@link IExecutor}s that are doing some work right now.
     */
    int countBusy();

    /**
     * Returns the current size of the executor pool for this computer.
     */
    int countExecutors();

    /**
     * Indicates whether the agent can accept a new task when it becomes idle.
     * {@code false} does not necessarily mean the agent is disconnected.
     * @return {@code true} if the agent is online.
     * @see #isConnected()
     */
    boolean isOnline();

    /**
     * Indicates whether the agent is actually connected to the controller.
     * <p>
     * This default implementation helps maintain compatibility across Jenkins versions.
     * The core {@link Computer#isConnected()} returns {@code true} if the agent is connected.
     *
     * @return {@code true} if the agent is connected to the controller.
     */
    default boolean isConnected() {
        return isOnline();
    }

    /**
     * @return the number of {@link IExecutor}s that are idle right now.
     */
    int countIdle();

    /**
     * @return true if this computer can be launched by Jenkins proactively and automatically.
     *
     * <p>
     * For example, inbound agents return {@code false} from this, because the launch process
     * needs to be initiated from the agent side.
     */
    boolean isLaunchSupported();

    /**
     * Attempts to connect this computer.
     *

Review comment (suggestion):
Could be omitted. The default is not of interest to OSS Jenkins developers since the sole implementation overrides the method.

Code after:
    int countExecutors();

    /**
     * Indicates whether the agent can accept a new task when it becomes idle.
     * {@code false} does not necessarily mean the agent is disconnected.
     * @return {@code true} if the agent is online.
     * @see #isConnected()
     */
    boolean isOnline();

    /**
     * Indicates whether the agent is actually connected to the controller.
     * @return {@code true} if the agent is connected to the controller.
     */
    default boolean isConnected() {
        return isOnline();
    }

    /**
     * @return the number of {@link IExecutor}s that are idle right now.
     */
    int countIdle();

    /**
     * @return true if this computer can be launched by Jenkins proactively and automatically.
     *
     * <p>
     * For example, inbound agents return {@code false} from this, because the launch process
     * needs to be initiated from the agent side.
     */
    boolean isLaunchSupported();

    /**
     * Attempts to connect this computer.
     *
     * @param forceReconnect If true and a connect activity is already in progress, it will be cancelled and
     *                       the new one will be started. If false, and a connect activity is already in progress, this method
     *                       will do nothing and just return the pending connection operation.
     * @return A {@link Future} representing pending completion of the task. The 'completion' includes
     * both a successful completion and a non-successful completion (such distinction typically doesn't
     * make much sense because as soon as {@link IComputer} is connected it can be disconnected by some other threads.)
     */
    Future<?> connect(boolean forceReconnect);

    @NonNull
    @Override
    default ACL getACL() {
        return Jenkins.get().getAuthorizationStrategy().getACL(this);
    }
}