\Elastica\ConnectionConnectionPool

Description of ConnectionPool.

Summary

Methods
Properties
Constants
__construct()
addConnection()
setConnections()
hasConnection()
getConnections()
getConnection()
onFail()
getStrategy()
No public properties found
No constants found
No protected methods found
$_connections
$_strategy
$_callback
N/A
No private methods found
No private properties found
N/A

Properties

$_connections

$_connections : array|array<mixed,\Elastica\Connection>

Type

array|array<mixed,\Elastica\Connection> — Connections array

$_callback

$_callback : callback

Type

callback — Function called on connection fail

Methods

__construct()

__construct(array  $connections, \Elastica\Connection\Strategy\StrategyInterface  $strategy, callback  $callback = null) 

Parameters

array $connections
\Elastica\Connection\Strategy\StrategyInterface $strategy
callback $callback

addConnection()

addConnection(\Elastica\Connection  $connection) : $this

Parameters

\Elastica\Connection $connection

Returns

$this

setConnections()

setConnections(array|array<mixed,\Elastica\Connection>  $connections) : $this

Parameters

array|array<mixed,\Elastica\Connection> $connections

Returns

$this

hasConnection()

hasConnection() : boolean

Returns

boolean

getConnections()

getConnections() : array

Returns

array

getConnection()

getConnection() : \Elastica\Connection

Throws

\Elastica\Exception\ClientException

Returns

\Elastica\Connection