public static RxClient<ByteBuf, ByteBuf> createTcpClient(String host, int port) { return RxNetty.<ByteBuf, ByteBuf>newTcpClientBuilder(host, port).build(); }
public static RxClient<ByteBuf, ByteBuf> createTcpClient(String host, int port) { return RxNetty.<ByteBuf, ByteBuf>newTcpClientBuilder(host, port).build(); }
public ReplicationTransportClient(InetSocketAddress address, Codec codec, MessageConnectionMetrics metrics) { this.address = address; this.metrics = metrics; this.rxClient = RxNetty.newTcpClientBuilder(address.getHostName(), address.getPort()) .pipelineConfigurator(EurekaTransports.replicationPipeline(codec)) .build(); }
public static <I, O> RxClient<I, O> createTcpClient(String host, int port, PipelineConfigurator<O, I> configurator) { return RxNetty.<I, O>newTcpClientBuilder(host, port).pipelineConfigurator(configurator).build(); }
public static <I, O> RxClient<I, O> createTcpClient(String host, int port, PipelineConfigurator<O, I> configurator) { return RxNetty.<I, O>newTcpClientBuilder(host, port).pipelineConfigurator(configurator).build(); }
public ReplicationTransportClient(EurekaTransportConfig config, Server address, MessageConnectionMetrics metrics) { this.config = config; this.address = address; this.metrics = metrics; this.rxClient = RxNetty.newTcpClientBuilder(address.getHost(), address.getPort()) .pipelineConfigurator(EurekaTransports.replicationPipeline(config.getCodec())) .withNoConnectionPooling() // never pool as the address may be bound to different servers in the cloud .build(); }
@Override protected RxClient<I, O> createRxClient(Server server) { ClientBuilder<I, O> builder = RxNetty.newTcpClientBuilder(server.getHost(), server.getPort()); if (pipelineConfigurator != null) { builder.pipelineConfigurator(pipelineConfigurator); } Integer connectTimeout = getProperty(IClientConfigKey.Keys.ConnectTimeout, null, DefaultClientConfigImpl.DEFAULT_CONNECT_TIMEOUT); builder.channelOption(ChannelOption.CONNECT_TIMEOUT_MILLIS, connectTimeout); if (isPoolEnabled()) { builder.withConnectionPoolLimitStrategy(poolStrategy) .withIdleConnectionsTimeoutMillis(idleConnectionEvictionMills) .withPoolIdleCleanupScheduler(poolCleanerScheduler); } else { builder.withNoConnectionPooling(); } RxClient<I, O> client = builder.build(); return client; }