class LimitingConnectionFactoryFilter implements ConnectionFactoryFilter<ResolvedAddress, C> {

    public static <A, C extends ListenableAsyncCloseable> ConnectionFactoryFilter<A, C> withMax(
            int maxConnections) {
        return new LimitingConnectionFactoryFilter<>(new MaxConnectionsLimiter<>(maxConnections));
    }

    private  LimitingConnectionFactoryFilter(final ConnectionLimiter<ResolvedAddress, C> limiter);

}