Horde_Memcache::failover PHP Method

failover() public method

Failover method.
See also: Memcache::addServer()
public failover ( string $host, integer $port )
$host string Hostname.
$port integer Port.
    public function failover($host, $port)
    {
        $pos = array_search($host . ':' . $port, $this->_servers);
        if ($pos !== false) {
            unset($this->_servers[$pos]);
            if (!count($this->_servers)) {
                throw new Horde_Memcache_Exception('Could not connect to any defined memcache servers.');
            }
        }
    }