Class CacheConnectionHttpLoadBalanceFactory<ResolvedAddress>

java.lang.Object
io.servicetalk.http.utils.CacheConnectionHttpLoadBalanceFactory<ResolvedAddress>
Type Parameters:
ResolvedAddress - The resolved address type.
All Implemented Interfaces:
LoadBalancerFactory<ResolvedAddress,FilterableStreamingHttpLoadBalancedConnection>, HttpLoadBalancerFactory<ResolvedAddress>, ExecutionStrategyInfluencer<ExecutionStrategy>

public final class CacheConnectionHttpLoadBalanceFactory<ResolvedAddress> extends Object implements HttpLoadBalancerFactory<ResolvedAddress>
A HttpLoadBalancerFactory that will cache successive connection creation attempts and return the same Single instead of creating a new connection each time. This is useful when a spike of connections occurs instead of creating a new connection for each request, if the underlying protocol version supports concurrency (pipelining, multiplexing) a single connection creation attempt can be used before the connection is actually established, which will reduce the overall number of connectiosn required.