Get the master connection

@return \Redis
337022
protected function _master()
    {
        if (null === $this->_master) {
            $this->_master = $this->_connection($this->_config_master);
        }
        return $this->_master;
    }
679556
public function getConnection()
    {
        if (!$this->connection) {
            if ($this->connectionName) {
                $this->connection = $this->mandango->getConnection($this->connectionName);
            } else {
                $this->connection = $this->mandango->getDefaultConnection();
            }
        }

        return $this->connection;
    }
239919
public function getConnection()
    {
        if(!$this->_connection) {
            $this->_connection = new \Guzzle\Http\Client($this->getHost());
        }

        return $this->_connection;
    }
579948
public function getPassword()
    {
        if ($this->isSlave() && ! $this->password) {
            return $this->_master->getPassword();
        }
        return $this->password;
    }
1278152
public function connection()
    {
        if (empty($this->connection)) {
            try {
                $x = new MongoClient($this->connectionString());
                $this->connection = $x->selectDB($this->db);
                return $this->connection;
            } catch (Exception $e) {
                // retry, mostly when mongodb has been restarted in order to get a new connection
                $maxRetries = 5;
                for ($counts = 1; $counts <= $maxRetries; $counts++) {
                    try {
                        $x = new MongoClient($this->connectionString());
                        $this->connection = $x->selectDB($this->db);
                        return $this->connection;
                    } catch (Exception $e) {
                        if ($counts === $maxRetries) {
                            throw $e;
                        }
                    }
                }
                throw $e;
            }
        }

        return $this->connection;
    }
857299
static function getConnections() {
		foreach (self::$parameters as $name => $params) {
			self::connect($name);
		}
		return self::$connections;
	}
1343472
public function getDefaultRedis(): ?Connection
    {
        // From Laravel 5.4, the redis facade now returns the
        // Redis Manager, which is why we must use it to obtain
        // the default Redis connection. Thus, the
        // "Illuminate\Contracts\Redis\Database" interface is no
        // longer used.
        $factory = Redis::getFacadeRoot();
        if (isset($factory)) {
            return $factory->connection();
        }
        return $factory;
    }
768745
public function getConnection()
    {
        if (!$this->connection) {
            if ($this->connectionName) {
                $this->connection = $this->mongator->getConnection($this->connectionName);
            } else {
                $this->connection = $this->mongator->getDefaultConnection();
            }
        }

        return $this->connection;
    }
1191645
public function getConnection()
    {
        if ($chosenConn = $this->connections->pop()) {
            $this->connections->push($chosenConn);

            return $chosenConn;
        }
    }
1276613
public function createMasterClient($name)
    {
        $master = $this->getMasterAddressByName($name);
        if (!isset($master[0], $master[1])) {
            throw new RedisException('Master not found');
        }

        return Factory::client([
            'host' => $master[0],
            'port' => $master[1],
            'timeout' => $this->timeout,
            'persistent' => $this->persistent,
            'database' => $this->database,
            'password' => $this->getPassword(),
        ]);
    }
63101
public function connect()
    {
        $connection = $this->config->get('redis_connection');
        $params = array('prefix' => $this->config->get('redis_prefix').':');

        // connect to redis using the connection details in the config file
        $this->redis = new \Predis\Client(
            $connection,
            $params
            );
    }
269442
def get_connection(name='default', use_strict_redis=False):
    
    from .settings import QUEUES
    return get_redis_connection(QUEUES[name], use_strict_redis)
694103
public function getMasterClient($name)
    {
        if (!isset($this->master[$name])) {
            $this->master[$name] = $this->createMasterClient($name);
        }

        return $this->master[$name];
    }
146463
protected function _slave()
    {
        if (empty($this->_config_slaves)) {
            return $this->_master();
        }
        if (null === $this->_slave) {
            $count = count($this->_config_slaves);
            $index = mt_rand(0, $count-1);
            $config = $this->_config_slaves[$index];
            $this->_slave = $this->_connection($config);
        }
        return $this->_slave;
    }
99741
public function getConn()
    {
        if ($this->conn === null) {
            $this->conn = Connection::connect($this->req->getUrlParam('conn'), $this);
            if ($this->conn === false) {
                $this->res->error = Connection::getLastError();
                $this->finish();
            } else {
                if ($this->conn !== null) {
                    $this->conn->addWriteData($this->getRequestBuf());
                }
            }
        }
        return $this->conn;
    }
56170
public function getDsn()
    {
        if ($this->rawConfig['dsn']) {
            return $this->rawConfig['dsn'];
        }

        if (isset($this->connectionStrings[$this->getType()])) {
            return $this->connectionStrings[$this->getType()]->getDsn();
        }
    }
475455
public function getMasterClient($name)
    {
        if (!isset($this->_master[$name])) {
            $this->_master[$name] = $this->createMasterClient($name);
        }
        return $this->_master[$name];
    }