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 39 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 75 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 308 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 112 of file RedisConnRef.php.
Wikimedia\ObjectCache\RedisConnRef::clearLastError | ( | ) |
Definition at line 100 of file RedisConnRef.php.
Wikimedia\ObjectCache\RedisConnRef::getLastError | ( | ) |
Definition at line 96 of file RedisConnRef.php.
References Wikimedia\ObjectCache\RedisConnRef\$lastError.
Wikimedia\ObjectCache\RedisConnRef::getServer | ( | ) |
Definition at line 92 of file RedisConnRef.php.
References Wikimedia\ObjectCache\RedisConnRef\$server.
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 193 of file RedisConnRef.php.
Wikimedia\ObjectCache\RedisConnRef::isConnIdentical | ( | Redis | $conn | ) |
Redis | $conn |
Definition at line 304 of file RedisConnRef.php.
References Wikimedia\ObjectCache\RedisConnRef\$conn.
Referenced by Wikimedia\ObjectCache\RedisConnectionPool\handleError().
Wikimedia\ObjectCache\RedisConnRef::luaEval | ( | $script, | |
array | $params, | ||
$numKeys ) |
string | $script | |
array | $params | |
int | $numKeys |
RedisException |
Definition at line 252 of file RedisConnRef.php.
References Wikimedia\ObjectCache\RedisConnRef\$conn, Wikimedia\ObjectCache\RedisConnRef\$lastError, $params, and Wikimedia\ObjectCache\RedisConnRef\$server.
Referenced by MediaWiki\PoolCounter\PoolCounterRedis\initAndPopPoolSlotList(), JobQueueRedis\popAndAcquireBlob(), 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 163 of file RedisConnRef.php.
Wikimedia\ObjectCache\RedisConnRef::setLogger | ( | LoggerInterface | $logger | ) |
Definition at line 84 of file RedisConnRef.php.
References Wikimedia\ObjectCache\RedisConnRef\$logger.
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 178 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 208 of file RedisConnRef.php.
|
protected |
Definition at line 43 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\__construct(), Wikimedia\ObjectCache\RedisConnRef\isConnIdentical(), and Wikimedia\ObjectCache\RedisConnRef\luaEval().
|
protected |
Definition at line 47 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\getLastError(), and Wikimedia\ObjectCache\RedisConnRef\luaEval().
|
protected |
Definition at line 52 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\__construct(), and Wikimedia\ObjectCache\RedisConnRef\setLogger().
|
protected |
Definition at line 41 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\__construct().
|
protected |
Definition at line 45 of file RedisConnRef.php.
Referenced by Wikimedia\ObjectCache\RedisConnRef\__construct(), Wikimedia\ObjectCache\RedisConnRef\getServer(), and Wikimedia\ObjectCache\RedisConnRef\luaEval().