private void channelOptions(Map<ChannelOption<?>, Object> newChannelOptions) {
        @SuppressWarnings("unchecked")
        final ClientFactoryOptionValue<Map<ChannelOption<?>, Object>> castOptions =
                (ClientFactoryOptionValue<Map<ChannelOption<?>, Object>>) options.get(
                        ClientFactoryOptions.CHANNEL_OPTIONS);
        if (castOptions == null) {
            options.put(ClientFactoryOptions.CHANNEL_OPTIONS,
                        ClientFactoryOptions.CHANNEL_OPTIONS.newValue(ImmutableMap.copyOf(newChannelOptions)));
        } else {
            final ImmutableMap.Builder<ChannelOption<?>, Object> builder =
                    ImmutableMap.builderWithExpectedSize(newChannelOptions.size());
            castOptions.value().forEach((channelOption, value) -> {
                if (!newChannelOptions.containsKey(channelOption)) {
                    builder.put(channelOption, value);
                }
            });
            builder.putAll(newChannelOptions);

            options.put(ClientFactoryOptions.CHANNEL_OPTIONS,
                        ClientFactoryOptions.CHANNEL_OPTIONS.newValue(builder.build()));
        }
    }
Sets the options of sockets created by the {@link ClientFactory}.
core/src/main/java/com/linecorp/armeria/client/ClientFactoryBuilder.java