servicetalk-transport-netty-internal/src/main/java/io/servicetalk/transport/netty/internal/ChannelSet.java
/**
     * Add a {@link Channel} to this {@link ChannelSet}, if it is not already present. {@link Channel#id()} is used to
     * check uniqueness.
     *
     * @param channel The {@link Channel} to add.
     * @return {@code true} if the channel was added successfully, {@code false} otherwise.
     */
Add a  Channel to this  ChannelSet, if it is not already present.  Channel#id() is used to
check uniqueness.

@param channel The  Channel to add.
@return  true if the channel was added successfully,  false otherwise.
Add a Channel to this ChannelSet if it is not already present . Channel#id () is used to check uniqueness . @param channel The Channel to add . @return true if the channel was added successfully false otherwise .
public boolean addIfAbsent(final Channel channel) {
        final boolean added = channelMap.putIfAbsent(channel.id(), channel) == null;
        if (state != OPEN) {
            if (added) {
                channelMap.remove(channel.id(), channel);
                channel.close();
                return false;
            }
        } else if (added) {
            channel.closeFuture().addListener(remover);
        }
        return added;
    }
public boolean addIfAbsent ( final Channel channel ) { final boolean added = channelMap . putIfAbsent ( channel . id ( ) , channel ) == null ; if ( state != OPEN ) { if ( added ) { channelMap . remove ( channel . id ( ) , channel ) ; channel . close ( ) ; return false ; } } else if ( added ) { channel . closeFuture ( ) . addListener ( remover ) ; } return added ; }
Add a {@link Channel} to this {@link ChannelSet}, if it is not already present.
Add a { @link Channel } to this { @link ChannelSet } if it is not already present .