BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
Elasticsearch\Transport Class Reference

Public Member Functions

 __construct ($retries, $sniffOnStart=false, AbstractConnectionPool $connectionPool, LoggerInterface $log)
 
 getConnection ()
 
 performRequest ($method, $uri, $params=null, $body=null, $options=[])
 
 resultOrFuture ($result, $options=[])
 
 shouldRetry ($request)
 
 getLastConnection ()
 

Public Attributes

 $connectionPool
 
 $retryAttempts = 0
 
 $lastConnection
 
 $retries
 

Constructor & Destructor Documentation

Elasticsearch\Transport::__construct (   $retries,
  $sniffOnStart = false,
AbstractConnectionPool  $connectionPool,
LoggerInterface  $log 
)

Transport class is responsible for dispatching requests to the underlying cluster connections

Parameters
$retries
bool$sniffOnStart
ConnectionPool\AbstractConnectionPool$connectionPool
\Psr\Log\LoggerInterface$logMonolog logger object

Member Function Documentation

Elasticsearch\Transport::getConnection ( )

Returns a single connection from the connection pool Potentially performs a sniffing step before returning

Returns
ConnectionInterface Connection
Elasticsearch\Transport::getLastConnection ( )

Returns the last used connection so that it may be inspected. Mainly for debugging/testing purposes.

Returns
Connection
Elasticsearch\Transport::performRequest (   $method,
  $uri,
  $params = null,
  $body = null,
  $options = [] 
)

Perform a request to the Cluster

Parameters
string$methodHTTP method to use
string$uriHTTP URI to send request to
null$paramsOptional query parameters
null$bodyOptional query body
array$options
Exceptions
Common\Exceptions\NoNodesAvailableException|\Exception
Returns
FutureArrayInterface
Elasticsearch\Transport::resultOrFuture (   $result,
  $options = [] 
)
Parameters
FutureArrayInterface$resultResponse of a request (promise)
array$optionsOptions for transport
Returns
callable|array
Elasticsearch\Transport::shouldRetry (   $request)
Parameters
$request
Returns
bool

The documentation for this class was generated from the following file: