get pool by name

@param string $name

@return PoolInterface
@throws \Swoft\Exception\InvalidArgumentException
779724
public static function getPool(string $name): PoolInterface
    {
        $collector = PoolCollector::getCollector();
        if (!isset($collector[$name])) {
            throw new InvalidArgumentException("the pool of $name is not exist!");
        }

        $poolBeanName = $collector[$name];

        return self::getBean($poolBeanName);
    }
155334
public static function getRequestContextResource(string $name)
    {
        $resource = RequestContext::get('poolResource.' . $name);
        if(null === $resource)
        {
            $resource = static::getResource($name);
            RequestContext::set('poolResource.' . $name, $resource);
        }
        return $resource;
    }
485934
public function get($name)
    {
        if (isset($this->container[$name])) {
            return $this->container[$name];
        } else {
            return new Iterator([]);
        }
    }
562820
public function get($name)
    {
        $tid = $this->getTid($name);
        if (!isset($this->_containers[$tid])) {
            $this->_containers[$tid] = new Container([
                'manager' => $this,
            ]);
        }
        return $this->_containers[$tid]->get($name);
    }
1128638
public function getContainer($name)
    {
        // try to match one of the container names with the passed name
        /** @var \AppserverIo\Psr\ApplicationServer\Configuration\ContainerConfigurationInterface $container */
        foreach ($this->getContainers() as $container) {
            if (fnmatch($name, $container->getName())) {
                return $container;
            }
        }
    }
927327
public function getCollector($name)
    {
        if (!isset($this->data['collectors'][$name])) {
            throw new InvalidArgumentException("Invalid debug collector '$name'");
        }

        return $this->data['collectors'][$name];
    }
1371626
public function getSource($name)
    {
        if (!isset($this->sources[$name])) {
            throw new \InvalidArgumentException(sprintf('Source "%s" is not registered.', $name));
        }

        return $this->sources[$name];
    }
1357596
public function findConnection(string $name=null)
  {
    if ( empty($name) ) {
      # Take first available connection
      $connection = \reset($this->connections);
      if ($connection === false)
        return null;
    } else {
      # Attempt to find the connection from the pool
      $connection = ( $this->connections[\strtolower($name)] ?? null);
    }

    return $connection;
  }
1000099
public static function lookupByName($name)
    {
        if (empty($name)) {
            throw new \InvalidArgumentException('Argument "name" cannot be empty');
        }

        if (!isset(self::$methods_config[$name])) {
            throw new \InvalidArgumentException('Method "' . $name . '" doesn\'t exist');
        }

        return self::$methods_config[$name];
    }
745730
public function get(string $name): LinkInterface
    {
        if (!$this->has($name)) {
            throw new \InvalidArgumentException('Missing link ' . $name);
        }

        return $this->collection[$name];
    }
190938
public static function get($name = null)
    {
        if ($name === null) {
            $name = array_shift(array_keys(self::$containers));
        }
        return self::$containers[$name] ? self::$containers[$name] : null;
    }
755061
public function getPusher($name)
    {
        if (!$this->hasPusher($name)) {
            throw new \InvalidArgumentException(sprintf('A pusher named "%s" has not been registered.', $name));
        }

        return $this->pushers[$name];
    }
513609
public function getClient(string $name = 'default')
    {
        if (!isset($this->clients[$name])) {
            throw new InvalidArgumentException("No client with name \"$name\"");
        }

        return $this->clients[$name];
    }
182689
private function applyNewPool($poolName)
    {
        if (array_key_exists($poolName, $this->map)) {
            throw new Exception('the name is exists in pool map');
        }
        $this->map[$poolName] = new \SplStack();

        return $this->map[$poolName];
    }
598126
public function getCollector($name)
    {
        if (!isset($this->collectors[$name])) {
            throw new \InvalidArgumentException(sprintf('Collector "%s" does not exist.', $name));
        }

        return $this->collectors[$name];
    }
259465
public function getFieldByName($name)
    {
        if (!isset($this->_fieldNameMap[$name])) {
            $message = 'Field name "' . $name . '" not associated to this schema.';
            throw new \InvalidArgumentException($message);
        }
        return $this->getField($this->_fieldNameMap[$name]);
    }
708873
def get(self, name):
        
        if name not in self.pools:
            self.pools[name] = _Pool(logger=self.logger, name=name)
        return self.pools[name].get()