Create a pool
@param type The type
@param cm The connection manager
@param pc The pool configuration
@return The pool
335034
public static Pool createPool(String type, ConnectionManager cm, PoolConfiguration pc)
   {
      if (type == null || type.equals(""))
         return new DefaultPool(cm, pc);

      type = type.toLowerCase(Locale.US);
      
      switch (type)
      {
         case "default":
            return new DefaultPool(cm, pc);
         case "stable":
            return new StablePool(cm, pc);
         default:
         {
            Class<? extends Pool> clz = customPoolTypes.get(type);

            if (clz == null)
               throw new RuntimeException(type + " can not be found");

            try
            {
               Constructor constructor = clz.getConstructor(ConnectionManager.class, PoolConfiguration.class);
               return (Pool)constructor.newInstance(cm, pc);
            }
            catch (Exception e)
            {
               throw new RuntimeException(type + " can not be created", e);
            }
         }
      }
   }
309145
private void createPool(String poolName, Properties connectionPoolProperties) {

    releaseConnectionPool(poolName);

    // DBUtils execute methods require autoCommit to be true.
    connectionPoolProperties.put("autoCommit", true);

    HikariConfig config = new HikariConfig(connectionPoolProperties);
    config.setPoolName(poolName);
    HikariDataSource ds = new HikariDataSource(config);
    pools.put(poolName, ds);
    logger.info("Initialized pool '{}'", poolName);
  }
1004083
protected BoneCP createPool(BoneCPConfig config) {
		try{
			return new BoneCP(config);
		}  catch (SQLException e) {
			throw new HibernateException(e);
		}
	}
842103
private String createConfiguration() {

        CmsResourceManager resManager = OpenCms.getResourceManager();
        if (resManager == null) {
            // can happen during the OpenCms startup
            return "";
        }
        List<I_CmsResourceType> resTypes = resManager.getResourceTypes();
        List<String> options = new ArrayList<String>();
        for (I_CmsResourceType resType : resTypes) {
            if (resType.isDirectEditable()) {
                options.add(resType.getTypeName());
            }
        }
        Collections.sort(options);
        return Joiner.on("|").join(options);
    }
190214
public Map<PoolInfo, PoolInfoMetrics> getPoolInfoMetrics(ResourceType type) {
    return schedulersForTypes.get(type).getPoolInfoMetrics();
  }
373538
public static JedisPool newJedisPool(JedisPoolConfig poolConfig, String hostAndPort) {
        return newJedisPool(poolConfig, hostAndPort, null, Protocol.DEFAULT_DATABASE,
                Protocol.DEFAULT_TIMEOUT);
    }
428766
public <S, D> TypeMap<S, D> create(S source, Class<S> sourceType, Class<D> destinationType,
      String typeMapName, InheritingConfiguration configuration, MappingEngineImpl engine) {
    synchronized (lock) {
      TypeMapImpl<S, D> typeMap = new TypeMapImpl<S, D>(sourceType, destinationType, typeMapName,
          configuration, engine);
      if (configuration.isImplicitMappingEnabled()
          && Types.mightContainsProperties(typeMap.getSourceType())
          && Types.mightContainsProperties(typeMap.getDestinationType()))
        ImplicitMappingBuilder.build(source, typeMap, config.typeMapStore, config.converterStore);
      typeMaps.put(TypePair.of(sourceType, destinationType, typeMapName), typeMap);
      return typeMap;
    }
  }
1066990
public static Executor createExecutor(int threadPoolSize, int threadPriority,
			QueueProcessingType tasksProcessingType) {
		boolean lifo = tasksProcessingType == QueueProcessingType.LIFO;
		BlockingQueue<Runnable> taskQueue =
				lifo ? new LIFOLinkedBlockingDeque<Runnable>() : new LinkedBlockingQueue<Runnable>();
		return new ThreadPoolExecutor(threadPoolSize, threadPoolSize, 0L, TimeUnit.MILLISECONDS, taskQueue,
				createThreadFactory(threadPriority, "uil-pool-"));
	}
1241011
private void applyPoolConfiguration(PoolConfiguration pc,
                                       org.ironjacamar.common.api.metadata.common.Pool p)
   {
      if (p != null)
      {
         if (p.getMinPoolSize() != null)
            pc.setMinSize(p.getMinPoolSize().intValue());

         if (p.getInitialPoolSize() != null)
            pc.setInitialSize(p.getInitialPoolSize().intValue());

         if (p.getMaxPoolSize() != null)
            pc.setMaxSize(p.getMaxPoolSize().intValue());

         if (p.isPrefill() != null)
            pc.setPrefill(p.isPrefill().booleanValue());
         if (p.getFlushStrategy() != null)
            pc.setFlushStrategy(p.getFlushStrategy());

      }
   }
1062408
public static <K, V> QueuedKeyedResourcePool<K, V> create(ResourceFactory<K, V> factory,
                                                              ResourcePoolConfig config) {
        return new QueuedKeyedResourcePool<K, V>(factory, config);
    }
210039
def pool_create(self, name, description, category):
        
        params = {
            'pool[name]': name,
            'pool[description]': description,
            'pool[category]': category
            }
        return self._get('pools.json', params, method='POST', auth=True)
124211
public static Object createProxy(PageContext pc, Component cfc, Class extendz, Class... interfaces) throws PageException, IOException {
	PageContextImpl pci = (PageContextImpl) pc;
	// ((ConfigImpl)pci.getConfig()).getClassLoaderEnv()
	ClassLoader[] parents = extractClassLoaders(null, interfaces);

	if (extendz == null) extendz = Object.class;
	if (interfaces == null) interfaces = new Class[0];
	else {
	    for (int i = 0; i < interfaces.length; i++) {
		if (!interfaces[i].isInterface()) throw new IOException("definition [" + interfaces[i].getName() + "] is a class and not a interface");
	    }
	}

	Type typeExtends = Type.getType(extendz);
	Type[] typeInterfaces = ASMUtil.toTypes(interfaces);
	String[] strInterfaces = new String[typeInterfaces.length];
	for (int i = 0; i < strInterfaces.length; i++) {
	    strInterfaces[i] = typeInterfaces[i].getInternalName();
	}

	String className = createClassName(extendz, interfaces);
	// Mapping mapping = cfc.getPageSource().getMapping();

	// get ClassLoader
	PhysicalClassLoader pcl = null;
	try {
	    pcl = (PhysicalClassLoader) pci.getRPCClassLoader(false, parents);// mapping.getConfig().getRPCClassLoader(false)
	}
	catch (IOException e) {
	    throw Caster.toPageException(e);
	}
	Resource classFile = pcl.getDirectory().getRealResource(className.concat(".class"));

	// check if already exists, if yes return
	if (classFile.exists()) {
	    try {
		Object obj = newInstance(pcl, className, pc.getConfig(), cfc);
		if (obj != null) return obj;
	    }
	    catch (Throwable t) {
		ExceptionUtil.rethrowIfNecessary(t);
	    }
	}

	/*
	 * String classNameOriginal=component.getPageSource().getFullClassName(); String
	 * realOriginal=classNameOriginal.replace('.','/'); Resource classFileOriginal =
	 * mapping.getClassRootDirectory().getRealResource(realOriginal.concat(".class"));
	 */
	ClassWriter cw = ASMUtil.getClassWriter();

	cw.visit(Opcodes.V1_6, Opcodes.ACC_PUBLIC, className, null, typeExtends.getInternalName(), strInterfaces);
	// BytecodeContext statConstr = null;//new
	// BytecodeContext(null,null,null,cw,real,ga,Page.STATIC_CONSTRUCTOR);
	// BytecodeContext constr = null;//new BytecodeContext(null,null,null,cw,real,ga,Page.CONSTRUCTOR);

	// field Component
	FieldVisitor _fv = cw.visitField(Opcodes.ACC_PRIVATE, "cfc", COMPONENT_NAME, null, null);
	_fv.visitEnd();
	_fv = cw.visitField(Opcodes.ACC_PRIVATE, "config", CONFIG_WEB_NAME, null, null);
	_fv.visitEnd();

	// Constructor
	GeneratorAdapter adapter = new GeneratorAdapter(Opcodes.ACC_PUBLIC, CONSTRUCTOR, null, null, cw);
	Label begin = new Label();
	adapter.visitLabel(begin);
	adapter.loadThis();
	adapter.invokeConstructor(Types.OBJECT, SUPER_CONSTRUCTOR);

	// adapter.putField(JAVA_PROXY, arg1, arg2)

	adapter.visitVarInsn(Opcodes.ALOAD, 0);
	adapter.visitVarInsn(Opcodes.ALOAD, 1);
	adapter.visitFieldInsn(Opcodes.PUTFIELD, className, "config", CONFIG_WEB_NAME);

	adapter.visitVarInsn(Opcodes.ALOAD, 0);
	adapter.visitVarInsn(Opcodes.ALOAD, 2);
	adapter.visitFieldInsn(Opcodes.PUTFIELD, className, "cfc", COMPONENT_NAME);

	adapter.visitInsn(Opcodes.RETURN);
	Label end = new Label();
	adapter.visitLabel(end);
	adapter.visitLocalVariable("config", CONFIG_WEB_NAME, null, begin, end, 1);
	adapter.visitLocalVariable("cfc", COMPONENT_NAME, null, begin, end, 2);

	// adapter.returnValue();
	adapter.endMethod();

	// create methods
	Set<Class> cDone = new HashSet<Class>();
	Map<String, Class> mDone = new HashMap<String, Class>();
	for (int i = 0; i < interfaces.length; i++) {
	    _createProxy(cw, cDone, mDone, cfc, interfaces[i], className);
	}
	cw.visitEnd();

	// create class file
	byte[] barr = cw.toByteArray();

	try {
	    ResourceUtil.touch(classFile);
	    IOUtil.copy(new ByteArrayInputStream(barr), classFile, true);

	    pcl = (PhysicalClassLoader) pci.getRPCClassLoader(true, parents);
	    Class<?> clazz = pcl.loadClass(className, barr);
	    return newInstance(clazz, pc.getConfig(), cfc);
	}
	catch (Throwable t) {
	    ExceptionUtil.rethrowIfNecessary(t);
	    throw Caster.toPageException(t);
	}
    }
1302709
@SuppressWarnings({"unchecked"})
  public static <T extends MessageBundle> T create(final Class<T> type) {
    checkNotNull(type);
    return (T) Proxy.newProxyInstance(type.getClassLoader(), new Class[]{type}, new Handler(type));
  }
492895
public Cache createCache(String name, CacheConfiguration config, int type) throws CacheException {
		if (config == null) {
			throw new CacheException("Cache configuration is null");
		}
		
		Cache cache = null;

		switch (type) {
		case Cache.SYN_CACHE:
			cache = new SynchronizedCache(name, (SynchronizedCacheConfiguration) config);
			break;
		case Cache.EHCACHE_CACHE:
			cache = new EhCache(name, (EhCacheConfiguration) config);
			break;
		case Cache.MEMCACHED_CACHE:
			cache = new MemcachedCache(name, (MemcachedCacheConfiguration)config);
			break;
		}

		if (name != null && cache != null) {
			this.cachePool.put(name, cache);
		}
		return cache;
	}
883441
def pool_create(hypervisor, identifier, pool_path):
    
    path = os.path.join(pool_path, identifier)

    if not os.path.exists(path):
        os.makedirs(path)

    xml = POOL_DEFAULT_CONFIG.format(identifier, path)

    return hypervisor.storagePoolCreateXML(xml, 0)
307066
public V get(ResourceType type, PoolInfo poolInfo) {
    Map<PoolInfo, V> poolInfoMap = typePoolInfoMap.get(type);
    if (poolInfoMap == null) {
      return null;
    }
    return poolInfoMap.get(poolInfo);
  }
1183779
protected final PrcCsvColumnCreate<RS>
    createPutPrcCsvColumnCreate() throws Exception {
    PrcCsvColumnCreate<RS> proc = new PrcCsvColumnCreate<RS>();
    @SuppressWarnings("unchecked")
    PrcEntityCreate<RS, CsvColumn, Long> procDlg =
      (PrcEntityCreate<RS, CsvColumn, Long>)
        lazyGet(null, PrcEntityCreate.class.getSimpleName());
    proc.setPrcEntityCreate(procDlg);
    //assigning fully initialized object:
    this.processorsMap
      .put(PrcCsvColumnCreate.class.getSimpleName(), proc);
    return proc;
  }