PHP Interface Predis\Connection\Replication\ReplicationInterface

Author: Daniele Alessandri ([email protected])
Inheritance: extends Predis\Connection\AggregateConnectionInterface
Exibir arquivo Open project: nrk/predis

Public Methods

Method Description
getCurrent ( ) : Predis\Connection\NodeConnectionInterface Returns the connection in use by the replication backend.
getMaster ( ) : Predis\Connection\NodeConnectionInterface Returns the connection to the master server.
getSlaves ( ) : Predis\Connection\NodeConnectionInterface Returns a list of connections to slave servers.
switchToMaster ( ) Switches the internal connection in use to the master server.
switchToSlave ( ) Switches the internal connection in use to a random slave server.

Method Details

getCurrent() public method

Returns the connection in use by the replication backend.
public getCurrent ( ) : Predis\Connection\NodeConnectionInterface
return Predis\Connection\NodeConnectionInterface

getMaster() public method

Returns the connection to the master server.
public getMaster ( ) : Predis\Connection\NodeConnectionInterface
return Predis\Connection\NodeConnectionInterface

getSlaves() public method

Returns a list of connections to slave servers.
public getSlaves ( ) : Predis\Connection\NodeConnectionInterface
return Predis\Connection\NodeConnectionInterface

switchToMaster() public method

Switches the internal connection in use to the master server.
public switchToMaster ( )

switchToSlave() public method

Switches the internal connection in use to a random slave server.
public switchToSlave ( )