Create managed connection pool
@param poolName The name of the pool
@param mcp The managed connection pool
507059
public static synchronized void createManagedConnectionPool(String poolName, Object mcp)
   {
      log.tracef("%s", new TraceEvent(poolName,
                                      Integer.toHexString(System.identityHashCode(mcp)),
                                      TraceEvent.MANAGED_CONNECTION_POOL_CREATE,
                                      "NONE"));
   }
1236183
def create(self, pools):
        

        data = {'server_pools': pools}
        return super(ApiPool, self).post('api/v3/pool/', data)
1004083
protected BoneCP createPool(BoneCPConfig config) {
		try{
			return new BoneCP(config);
		}  catch (SQLException e) {
			throw new HibernateException(e);
		}
	}
433868
public static PoolInfo createPoolInfo(PoolInfoStrings poolInfoStrings) {
    if (poolInfoStrings == null) {
      return null;
    }

    return new PoolInfo(poolInfoStrings.getPoolGroupName(),
                        poolInfoStrings.getPoolName());
  }
41586
def init_poolmanager(self, connections, maxsize,
                         block=requests.adapters.DEFAULT_POOLBLOCK,
                         **pool_kwargs):
        """"""
        context = create_urllib3_context(ciphers=self.CIPHERS,
                                         ssl_version=ssl.PROTOCOL_TLSv1)
        pool_kwargs['ssl_context'] = context
        return super(TLSv1Adapter, self).init_poolmanager(connections, maxsize,
                                                          block, **pool_kwargs)
583696
public static synchronized void ccmUserTransaction(String poolName, Object mcp, Object cl,
                                                      Object connection, String key)
   {
      log.tracef("%s", new TraceEvent(poolName,
                                      Integer.toHexString(System.identityHashCode(mcp)),
                                      TraceEvent.CCM_USER_TRANSACTION,
                                      Integer.toHexString(System.identityHashCode(cl)),
                                      Integer.toHexString(System.identityHashCode(connection)),
                                      key));
   }
1102703
public synchronized boolean addPool(HostConnectionPool<CL> pool) {
        if (this.pools.add(pool)) {
            refresh();
            return true;
        }
        return false;
    }
1277847
private void createSystemConnection() {
        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.entry(tc, "createSystemConnection");

        Subject subject = _authorisationUtils.getSIBServerSubject();

        try {
            _connectionToMP = (MPCoreConnection) createConnection(subject,
                                                                  true, null);
        } catch (SIResourceException e) {
            // FFDC
            FFDCFilter
                            .processException(
                                              e,
                                              "com.ibm.ws.sib.processor.impl.MessageProcessor.createSystemConnection",
                                              "1:2529:1.445", this);

            // Won't ever be thrown
            if (TraceComponent.isAnyTracingEnabled()
                && tc.isEntryEnabled())
                SibTr.exit(tc, "createSystemConnection", "SIErrorException "
                                                         + e);
            throw new SIErrorException(e);
        }

        if (TraceComponent.isAnyTracingEnabled()
            && tc.isEntryEnabled())
            SibTr.exit(tc, "createSystemConnection");
    }
331106
function PoolNamespace(cluster, pattern, selector) {
  this._cluster = cluster;
  this._pattern = pattern;
  this._selector = new PoolSelector[selector]();
}
371382
public synchronized Pool getPool(String name) {
    Pool pool = pools.get(name);
    if (pool == null) {
      boolean isConfiguredPool = poolNamesInAllocFile.contains(name);
      pool = new Pool(name, isConfiguredPool);
      pools.put(name, pool);
    }
    return pool;
  }
969894
public ObjectPool createConnectionPool(JdbcConnectionDescriptor jcd)
    {
        if (log.isDebugEnabled()) log.debug("createPool was called");
        PoolableObjectFactory pof = new ConPoolFactory(this, jcd);
        GenericObjectPool.Config conf = jcd.getConnectionPoolDescriptor().getObjectPoolConfig();
        return (ObjectPool)new GenericObjectPool(pof, conf);
    }
1152747
private PoolEntry createPoolEntry()
   {
      try {
         final PoolEntry poolEntry = newPoolEntry();

         final long maxLifetime = config.getMaxLifetime();
         if (maxLifetime > 0) {
            // variance up to 2.5% of the maxlifetime
            final long variance = maxLifetime > 10_000 ? ThreadLocalRandom.current().nextLong( maxLifetime / 40 ) : 0;
            final long lifetime = maxLifetime - variance;
            poolEntry.setFutureEol(houseKeepingExecutorService.schedule(
               () -> {
                  if (softEvictConnection(poolEntry, "(connection has passed maxLifetime)", false /* not owner */)) {
                     addBagItem(connectionBag.getWaitingThreadCount());
                  }
               },
               lifetime, MILLISECONDS));
         }

         return poolEntry;
      }
      catch (ConnectionSetupException e) {
         if (poolState == POOL_NORMAL) { // we check POOL_NORMAL to avoid a flood of messages if shutdown() is running concurrently
            logger.error("{} - Error thrown while acquiring connection from data source", poolName, e.getCause());
            lastConnectionFailure.set(e);
         }
         return null;
      }
      catch (SQLException e) {
         if (poolState == POOL_NORMAL) { // we check POOL_NORMAL to avoid a flood of messages if shutdown() is running concurrently
            logger.debug("{} - Cannot acquire connection from data source", poolName, e);
            lastConnectionFailure.set(new ConnectionSetupException(e));
         }
         return null;
      }
      catch (Exception e) {
         if (poolState == POOL_NORMAL) { // we check POOL_NORMAL to avoid a flood of messages if shutdown() is running concurrently
            logger.error("{} - Error thrown while acquiring connection from data source", poolName, e);
            lastConnectionFailure.set(new ConnectionSetupException(e));
         }
         return null;
      }
   }
1367554
def create_pool(module, max_conns, *args, **kwargs):
    
    if not hasattr(module, 'threadsafety'):
        raise NotSupported("Cannot determine driver threadsafety.")
    if max_conns < 1:
        raise ValueError("Minimum number of connections is 1.")
    if module.threadsafety >= 2:
        return Pool(module, max_conns, *args, **kwargs)
    if module.threadsafety >= 1:
        return DummyPool(module, *args, **kwargs)
    raise ValueError("Bad threadsafety level: %d" % module.threadsafety)
984618
@Deprecated
    @SuppressWarnings("unchecked")
    public static <T> ChannelOption<T> newInstance(String name) {
        return (ChannelOption<T>) pool.newInstance(name);
    }
729700
def connection_from_pool_key(self, pool_key, request_context=None):
        
        with self.pools.lock:
            # If the scheme, host, or port doesn't match existing open
            # connections, open a new ConnectionPool.
            pool = self.pools.get(pool_key)
            if pool:
                return pool

            # Make a fresh ConnectionPool of the desired type
            scheme = request_context['scheme']
            host = request_context['host']
            port = request_context['port']
            pool = self._new_pool(scheme, host, port, request_context=request_context)
            self.pools[pool_key] = pool

        return pool
175146
@Override
    public Pool create(int minimum, int maximum, EJBPMICollaborator beanPerf, PoolDiscardStrategy d)
    {
        PoolImplBase result = new PoolImplThreadSafe(minimum, maximum, beanPerf, d, this);
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
            Tr.debug(tc, "create: " + result);
        return result;
    }
348159
protected JedisClientPool createRedisClientPool(String host, int port, String username,
            String password) {
        return createRedisClientPool(host, port, username, password, null);
    }