public function getConnectionByKeyName($name)
    {
        if ($this->_specifiedConnection->getConnection()) {
            $connection = $this->_specifiedConnection->getConnection();
        } elseif (count($this->_connections) == 1) {
            $connections = array_values($this->_connections);
            $connection = $connections[0];
        } else {
            $alias = $this->_keyDistributor->getConnectionByKeyName($name);
            $connection = $this->_connections[$alias];
        }

        return $connection;
    }
public function getConnectionByKeyName($name)
    {
        if ($this->_specifiedConnection->getConnection()) {
            $connection = $this->_specifiedConnection->getConnection();
        } elseif (count($this->_connections) == 1) {
            $connections = array_values($this->_connections);
            $connection = $connections[0];
        } else {
            $alias = $this->_keyDistributor->getConnectionByKeyName($name);
            $connection = $this->_connections[$alias];
        }

        return $connection;
    }
public function getConnectionByKeyName ( $ name ) { if ( $ this -> _specifiedConnection -> getConnection ( ) ) { $ connection = $ this -> _specifiedConnection -> getConnection ( ) ; } elseif ( count ( $ this -> _connections ) == 1 ) { $ connections = array_values ( $ this -> _connections ) ; $ connection = $ connections [ 0 ] ; } else { $ alias = $ this -> _keyDistributor -> getConnectionByKeyName ( $ name ) ; $ connection = $ this -> _connections [ $ alias ] ; } return $ connection ; }
Get Rediska connection instance by key name

@throws Rediska_Connection_Exception
@param string $name Key name
@return Rediska_Connection
Get Rediska connection instance by key name