|
MediaWiki master
|
Wrapper class for Redis connections that automatically reuses connections (via RAII pattern) More...
Inherits LoggerAwareInterface.

Public Member Functions | |
| __call ( $name, $arguments) | |
| Magic __call handler for most Redis functions. | |
| __construct (RedisConnectionPool $pool, $server, Redis $conn, LoggerInterface $logger) | |
| __destruct () | |
| clearLastError () | |
| getLastError () | |
| getServer () | |
| hScan ( $key, &$iterator, $pattern=null, $count=null) | |
| Hash Scan Handle this explicitly due to needing the iterator passed by reference. | |
| isConnIdentical (Redis $conn) | |
| luaEval ( $script, array $params, $numKeys) | |
| scan (&$iterator, $pattern=null, $count=null) | |
| Key Scan Handle this explicitly due to needing the iterator passed by reference. | |
| setLogger (LoggerInterface $logger) | |
| sScan ( $key, &$iterator, $pattern=null, $count=null) | |
| Set Scan Handle this explicitly due to needing the iterator passed by reference. | |
| zScan ( $key, &$iterator, $pattern=null, $count=null) | |
| Sorted Set Scan Handle this explicitly due to needing the iterator passed by reference. | |
Protected Attributes | |
| Redis | $conn |
| string null | $lastError |
| LoggerInterface | $logger |
| RedisConnectionPool | $pool |
| string | $server |
Wrapper class for Redis connections that automatically reuses connections (via RAII pattern)
This class proxies a Redis class instance from the php-redis PECL extension. All its methods can be called the same way.
Definition at line 25 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::__construct | ( | RedisConnectionPool | $pool, |
| $server, | |||
| Redis | $conn, | ||
| LoggerInterface | $logger ) |
| RedisConnectionPool | $pool | |
| string | $server | |
| Redis | $conn | |
| LoggerInterface | $logger |
Definition at line 61 of file RedisConnRef.php.
References Wikimedia\ObjectCache\RedisConnRef\$conn, Wikimedia\ObjectCache\RedisConnRef\$logger, Wikimedia\ObjectCache\RedisConnRef\$pool, and Wikimedia\ObjectCache\RedisConnRef\$server.
| Wikimedia\ObjectCache\RedisConnRef::__destruct | ( | ) |
Definition at line 297 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::__call | ( | $name, | |
| $arguments ) |
Magic __call handler for most Redis functions.
| string | $name | |
| array | $arguments |
| RedisException |
Definition at line 101 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::clearLastError | ( | ) |
Definition at line 89 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::getLastError | ( | ) |
Definition at line 85 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::getServer | ( | ) |
Definition at line 78 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnectionPool\handleError().
| Wikimedia\ObjectCache\RedisConnRef::hScan | ( | $key, | |
| & | $iterator, | ||
| $pattern = null, | |||
| $count = null ) |
Hash Scan Handle this explicitly due to needing the iterator passed by reference.
See: https://github.com/phpredis/phpredis#hScan
| string | $key | |
| int | &$iterator | |
| string | null | $pattern | |
| int | null | $count |
Definition at line 182 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::isConnIdentical | ( | Redis | $conn | ) |
| Redis | $conn |
Definition at line 293 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnectionPool\handleError().
| Wikimedia\ObjectCache\RedisConnRef::luaEval | ( | $script, | |
| array | $params, | ||
| $numKeys ) |
| string | $script | |
| array | $params | |
| int | $numKeys |
| RedisException |
Definition at line 241 of file RedisConnRef.php.
Referenced by MediaWiki\PoolCounter\PoolCounterRedis\initAndPopPoolSlotList(), MediaWiki\JobQueue\JobQueueRedis\popAndAcquireBlob(), MediaWiki\JobQueue\JobQueueRedis\pushBlobs(), MediaWiki\PoolCounter\PoolCounterRedis\registerAcquisitionTime(), and MediaWiki\PoolCounter\PoolCounterRedis\release().
| Wikimedia\ObjectCache\RedisConnRef::scan | ( | & | $iterator, |
| $pattern = null, | |||
| $count = null ) |
Key Scan Handle this explicitly due to needing the iterator passed by reference.
See: https://github.com/phpredis/phpredis#scan
| int | &$iterator | |
| string | null | $pattern | |
| int | null | $count |
Definition at line 152 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 70 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::sScan | ( | $key, | |
| & | $iterator, | ||
| $pattern = null, | |||
| $count = null ) |
Set Scan Handle this explicitly due to needing the iterator passed by reference.
See: https://github.com/phpredis/phpredis#sScan
| string | $key | |
| int | &$iterator | |
| string | null | $pattern | |
| int | null | $count |
Definition at line 167 of file RedisConnRef.php.
| Wikimedia\ObjectCache\RedisConnRef::zScan | ( | $key, | |
| & | $iterator, | ||
| $pattern = null, | |||
| $count = null ) |
Sorted Set Scan Handle this explicitly due to needing the iterator passed by reference.
See: https://github.com/phpredis/phpredis#hScan
| string | $key | |
| int | &$iterator | |
| string | null | $pattern | |
| int | null | $count |
Definition at line 197 of file RedisConnRef.php.
|
protected |
Definition at line 29 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\__construct().
|
protected |
Definition at line 33 of file RedisConnRef.php.
|
protected |
Definition at line 38 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\__construct().
|
protected |
Definition at line 27 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\__construct().
|
protected |
Definition at line 31 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\__construct().