MediaWiki  1.27.2
RedisConnRef Class Reference

Helper class to handle automatically marking connectons as reusable (via RAII pattern) More...

Collaboration diagram for RedisConnRef:

Public Member Functions

 __call ($name, $arguments)
 
 __construct (RedisConnectionPool $pool, $server, Redis $conn, LoggerInterface $logger)
 
 __destruct ()
 
 clearLastError ()
 
 getLastError ()
 
 getServer ()
 
 isConnIdentical (Redis $conn)
 
 luaEval ($script, array $params, $numKeys)
 

Protected Attributes

Redis $conn
 
 $lastError
 
LoggerInterface $logger
 
RedisConnectionPool $pool
 
 $server
 

Detailed Description

Helper class to handle automatically marking connectons as reusable (via RAII pattern)

This class simply wraps the Redis class and can be used the same way

Since
1.21

Definition at line 435 of file RedisConnectionPool.php.

Constructor & Destructor Documentation

RedisConnRef::__construct ( RedisConnectionPool  $pool,
  $server,
Redis  $conn,
LoggerInterface  $logger 
)
Parameters
RedisConnectionPool$pool
string$server
Redis$conn
LoggerInterface$logger

Definition at line 455 of file RedisConnectionPool.php.

References $conn, $logger, $pool, $server, and server.

RedisConnRef::__destruct ( )

Definition at line 578 of file RedisConnectionPool.php.

References server.

Member Function Documentation

RedisConnRef::__call (   $name,
  $arguments 
)

Definition at line 480 of file RedisConnectionPool.php.

References $conn, $e, $lastError, $name, $res, and server.

RedisConnRef::clearLastError ( )

Definition at line 476 of file RedisConnectionPool.php.

RedisConnRef::getLastError ( )

Definition at line 472 of file RedisConnectionPool.php.

References $lastError.

RedisConnRef::getServer ( )
Returns
string
Since
1.23

Definition at line 468 of file RedisConnectionPool.php.

References $server.

Referenced by RedisConnectionPool\handleError().

RedisConnRef::isConnIdentical ( Redis  $conn)
Parameters
Redis$conn
Returns
bool

Definition at line 574 of file RedisConnectionPool.php.

References $conn.

Referenced by RedisConnectionPool\handleError().

RedisConnRef::luaEval (   $script,
array  $params,
  $numKeys 
)
Parameters
string$script
array$params
int$numKeys
Returns
mixed
Exceptions
RedisException

Definition at line 524 of file RedisConnectionPool.php.

References $conn, $lastError, $res, and $server.

Referenced by PoolCounterRedis\initAndPopPoolSlotList(), JobQueueRedis\popAndAcquireBlob(), JobQueueRedis\pushBlobs(), PoolCounterRedis\registerAcquisitionTime(), and PoolCounterRedis\release().

Member Data Documentation

Redis RedisConnRef::$conn
protected

Definition at line 439 of file RedisConnectionPool.php.

Referenced by __call(), __construct(), isConnIdentical(), and luaEval().

RedisConnRef::$lastError
protected

Definition at line 442 of file RedisConnectionPool.php.

Referenced by __call(), getLastError(), and luaEval().

LoggerInterface RedisConnRef::$logger
protected

Definition at line 447 of file RedisConnectionPool.php.

Referenced by __construct().

RedisConnectionPool RedisConnRef::$pool
protected

Definition at line 437 of file RedisConnectionPool.php.

Referenced by __construct().

RedisConnRef::$server
protected

Definition at line 441 of file RedisConnectionPool.php.

Referenced by __construct(), getServer(), and luaEval().


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