src/main/java/reactor/netty/resources/ConnectionProvider.java
/**
	 * Create a new {@link ConnectionProvider} to cache and reuse a fixed maximum
	 * number of {@link Connection}.
	 * <p>A Fixed {@link ConnectionProvider} will open up to the given max connection value.
	 * Further connections will be pending acquisition indefinitely.
	 *
	 * @param name the connection pool name
	 * @param maxConnections the maximum number of connections before starting pending
	 * @param acquireTimeout the maximum time in millis after which a pending acquire
	 *                          must complete or the {@link TimeoutException} will be thrown.
	 * @param maxIdleTime the {@link Duration} after which the channel will be closed (resolution: ms),
	 *                    if {@code NULL} there is no max idle time
	 *
	 * @return a new {@link ConnectionProvider} to cache and reuse a fixed maximum
	 * number of {@link Connection}
	 */
Create a new  ConnectionProvider to cache and reuse a fixed maximum
number of  Connection.
A Fixed  ConnectionProvider will open up to the given max connection value.
Further connections will be pending acquisition indefinitely.

@param name the connection pool name
@param maxConnections the maximum number of connections before starting pending
@param acquireTimeout the maximum time in millis after which a pending acquire
must complete or the  TimeoutException will be thrown.
@param maxIdleTime the  Duration after which the channel will be closed (resolution: ms),
if  NULL there is no max idle time

@return a new  ConnectionProvider to cache and reuse a fixed maximum
number of  Connection
Create a new ConnectionProvider to cache and reuse a fixed maximum number of Connection . A Fixed ConnectionProvider will open up to the given max connection value . Further connections will be pending acquisition indefinitely . @param name the connection pool name @param maxConnections the maximum number of connections before starting pending @param acquireTimeout the maximum time in millis after which a pending acquire must complete or the TimeoutException will be thrown . @param maxIdleTime the Duration after which the channel will be closed ( resolution : ms ) if NULL there is no max idle time @return a new ConnectionProvider to cache and reuse a fixed maximum number of Connection
static ConnectionProvider fixed(String name, int maxConnections, long acquireTimeout, @Nullable Duration maxIdleTime) {
		if (maxConnections == -1) {
			return elastic(name);
		}
		if (maxConnections <= 0) {
			throw new IllegalArgumentException("Max Connections value must be strictly positive");
		}
		if (acquireTimeout < 0) {
			throw new IllegalArgumentException("Acquire Timeout value must be positive");
		}
		return new PooledConnectionProvider(name,
				(allocator, destroyHandler, evictionPredicate) ->
				                PoolBuilder.from(allocator)
				                           .sizeBetween(0, maxConnections)
				                           .maxPendingAcquireUnbounded()
				                           .destroyHandler(destroyHandler)
				                           .evictionPredicate(evictionPredicate
				                                   .or((poolable, meta) -> maxIdleTime != null &&
				                                           meta.idleTime() >= maxIdleTime.toMillis()))
				                           .fifo(),
				acquireTimeout,
				maxConnections);
	}
static ConnectionProvider fixed ( String name , int maxConnections , long acquireTimeout , @ Nullable Duration maxIdleTime ) { if ( maxConnections == - 1 ) { return elastic ( name ) ; } if ( maxConnections <= 0 ) { throw new IllegalArgumentException ( "Max Connections value must be strictly positive" ) ; } if ( acquireTimeout < 0 ) { throw new IllegalArgumentException ( "Acquire Timeout value must be positive" ) ; } return new PooledConnectionProvider ( name , ( allocator , destroyHandler , evictionPredicate ) -> PoolBuilder . from ( allocator ) . sizeBetween ( 0 , maxConnections ) . maxPendingAcquireUnbounded ( ) . destroyHandler ( destroyHandler ) . evictionPredicate ( evictionPredicate . or ( ( poolable , meta ) -> maxIdleTime != null && meta . idleTime ( ) >= maxIdleTime . toMillis ( ) ) ) . fifo ( ) , acquireTimeout , maxConnections ) ; }
Create a new {@link ConnectionProvider} to cache and reuse a fixed maximum
 number of {@link Connection}.
Create a new { @link ConnectionProvider } to cache and reuse a fixed maximum number of { @link Connection } .