SimpleConnectionPool.php 902 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace Elasticsearch\ConnectionPool;
  3. use Elasticsearch\ConnectionPool\Selectors\SelectorInterface;
  4. use Elasticsearch\Connections\Connection;
  5. use Elasticsearch\Connections\ConnectionFactoryInterface;
  6. class SimpleConnectionPool extends AbstractConnectionPool implements ConnectionPoolInterface
  7. {
  8. /**
  9. * {@inheritdoc}
  10. */
  11. public function __construct($connections, SelectorInterface $selector, ConnectionFactoryInterface $factory, $connectionPoolParams)
  12. {
  13. parent::__construct($connections, $selector, $factory, $connectionPoolParams);
  14. }
  15. /**
  16. * @param bool $force
  17. *
  18. * @return Connection
  19. * @throws \Elasticsearch\Common\Exceptions\NoNodesAvailableException
  20. */
  21. public function nextConnection($force = false)
  22. {
  23. return $this->selector->select($this->connections);
  24. }
  25. public function scheduleCheck()
  26. {
  27. }
  28. }