MediaWiki  1.30.0
RedisConnRef Class Reference

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

Inheritance diagram for RedisConnRef:
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)
 
 setLogger (LoggerInterface $logger)
 

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 31 of file RedisConnRef.php.

Constructor & Destructor Documentation

◆ __construct()

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

Definition at line 51 of file RedisConnRef.php.

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

◆ __destruct()

RedisConnRef::__destruct ( )

Definition at line 178 of file RedisConnRef.php.

References server.

Member Function Documentation

◆ __call()

RedisConnRef::__call (   $name,
  $arguments 
)

Definition at line 80 of file RedisConnRef.php.

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

◆ clearLastError()

RedisConnRef::clearLastError ( )

Definition at line 76 of file RedisConnRef.php.

◆ getLastError()

RedisConnRef::getLastError ( )

Definition at line 72 of file RedisConnRef.php.

References $lastError.

◆ getServer()

RedisConnRef::getServer ( )
Returns
string
Since
1.23

Definition at line 68 of file RedisConnRef.php.

References $server.

Referenced by RedisConnectionPool\handleError().

◆ isConnIdentical()

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

Definition at line 174 of file RedisConnRef.php.

References $conn.

Referenced by RedisConnectionPool\handleError().

◆ luaEval()

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

Definition at line 124 of file RedisConnRef.php.

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

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

◆ setLogger()

RedisConnRef::setLogger ( LoggerInterface  $logger)

Definition at line 60 of file RedisConnRef.php.

References $logger.

Member Data Documentation

◆ $conn

Redis RedisConnRef::$conn
protected

Definition at line 35 of file RedisConnRef.php.

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

◆ $lastError

RedisConnRef::$lastError
protected

Definition at line 38 of file RedisConnRef.php.

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

◆ $logger

LoggerInterface RedisConnRef::$logger
protected

Definition at line 43 of file RedisConnRef.php.

Referenced by __construct(), and setLogger().

◆ $pool

RedisConnectionPool RedisConnRef::$pool
protected

Definition at line 33 of file RedisConnRef.php.

Referenced by __construct().

◆ $server

RedisConnRef::$server
protected

Definition at line 37 of file RedisConnRef.php.

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


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