function __construct($conf, $type, $key)
 {
     parent::__construct($conf, $type, $key);
     if (!self::$manager) {
         global $wgPoolCountClientConf;
         self::$manager = new PoolCounter_ConnectionManager($wgPoolCountClientConf);
     }
 }
 function __construct($conf, $type, $key)
 {
     parent::__construct($conf, $type, $key);
     $this->serversByLabel = $conf['servers'];
     $this->ring = new HashRing(array_fill_keys(array_keys($conf['servers']), 100));
     $conf['redisConfig']['serializer'] = 'none';
     // for use with Lua
     $this->pool = RedisConnectionPool::singleton($conf['redisConfig']);
     $this->keySha1 = sha1($this->key);
     $met = ini_get('max_execution_time');
     // usually 0 in CLI mode
     $this->lockTTL = $met ? 2 * $met : 3600;
     if (self::$active === null) {
         self::$active = array();
         register_shutdown_function(array(__CLASS__, 'releaseAll'));
     }
 }