<commit_before>package io.vitess.client.grpc.netty;

import io.grpc.netty.NettyChannelBuilder;
import io.vitess.client.grpc.RetryingInterceptor;
import io.vitess.client.grpc.RetryingInterceptorConfig;

public class DefaultChannelProvider implements NettyChannelProvider {

  private final RetryingInterceptorConfig config;

  public DefaultChannelProvider(RetryingInterceptorConfig config) {
    this.config = config;
  }

  @Override
  public NettyChannelBuilder getChannelBuilder(String target) {
    return NettyChannelBuilder.forTarget(target)
        .intercept(new RetryingInterceptor(config));
  }
}<commit_msg>forward port out patches to new branch<commit_after>package io.vitess.client.grpc.netty;

import io.grpc.netty.NettyChannelBuilder;
import io.netty.channel.EventLoopGroup;
import io.netty.channel.nio.NioEventLoopGroup;
import io.netty.util.concurrent.DefaultThreadFactory;
import io.vitess.client.grpc.RetryingInterceptor;
import io.vitess.client.grpc.RetryingInterceptorConfig;

public class DefaultChannelProvider implements NettyChannelProvider {
  private static final EventLoopGroup ELG = new NioEventLoopGroup(
      6,
      new DefaultThreadFactory("vitess-netyy")
  );

  private final RetryingInterceptorConfig config;

  public DefaultChannelProvider(RetryingInterceptorConfig config) {
    this.config = config;
  }

  @Override
  public NettyChannelBuilder getChannelBuilder(String target) {
    return NettyChannelBuilder.forTarget(target)
        .eventLoopGroup(ELG)
        .maxInboundMessageSize(16777216)
        .intercept(new RetryingInterceptor(config));
  }
}
{'fraction_non_alphanumeric': 0.07625, 'fraction_numerical': 0.005625, 'mean_word_length': 5.429718875502008, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6747843', 'n_tokens_mistral': 471, 'n_tokens_neox': 471, 'n_words': 86}