| 1: | <?php |
| 2: | |
| 3: | declare(strict_types=1); |
| 4: | |
| 5: | |
| 6: | |
| 7: | |
| 8: | |
| 9: | |
| 10: | |
| 11: | |
| 12: | |
| 13: | |
| 14: | |
| 15: | |
| 16: | |
| 17: | |
| 18: | |
| 19: | |
| 20: | |
| 21: | |
| 22: | namespace OpenSearch\ConnectionPool; |
| 23: | |
| 24: | use OpenSearch\ConnectionPool\Selectors\SelectorInterface; |
| 25: | use OpenSearch\Connections\ConnectionFactoryInterface; |
| 26: | use OpenSearch\Connections\ConnectionInterface; |
| 27: | |
| 28: | |
| 29: | @trigger_error(SimpleConnectionPool::class . ' is deprecated in 2.4.0 and will be removed in 3.0.0.', E_USER_DEPRECATED); |
| 30: | |
| 31: | |
| 32: | |
| 33: | |
| 34: | |
| 35: | |
| 36: | class SimpleConnectionPool extends AbstractConnectionPool implements ConnectionPoolInterface |
| 37: | { |
| 38: | |
| 39: | |
| 40: | |
| 41: | |
| 42: | public function __construct($connections, SelectorInterface $selector, ConnectionFactoryInterface $factory, $connectionPoolParams) |
| 43: | { |
| 44: | parent::__construct($connections, $selector, $factory, $connectionPoolParams); |
| 45: | } |
| 46: | |
| 47: | public function nextConnection(bool $force = false): ConnectionInterface |
| 48: | { |
| 49: | return $this->selector->select($this->connections); |
| 50: | } |
| 51: | |
| 52: | public function scheduleCheck(): void |
| 53: | { |
| 54: | } |
| 55: | } |
| 56: | |