메소드 |
설명 |
|
__call ( string $name, array $args ) : mixed |
Catch-all method |
|
__construct ( Credis_Client $client, string $password = NULL ) |
Connect with a Sentinel node. Sentinel will do the master and slave discovery |
|
createCluster ( string $name, integer $db, integer $replicas = 128, boolean $selectRandomSlave = true, boolean $writeOnly = false ) : Credis_Cluster |
Returns a Redis cluster object containing a random slave and the master
When $selectRandomSlave is true, only one random slave is passed. |
|
createMasterClient ( string $name ) : Credis_Client |
Discover the master node automatically and return an instance of Credis_Client that connects to the master |
|
createSlaveClients ( string $name ) : Credis_Client[] |
Discover the slave nodes automatically and return an array of Credis_Client objects |
|
failover ( string $name ) : mixed |
Perform an auto-failover which will re-elect another master and make the current master a slave |
|
forceStandalone ( ) : Credis_Sentinel |
|
|
getCluster ( string $name, integer $db, integer $replicas = 128, boolean $selectRandomSlave = true, boolean $writeOnly = false ) : Credis_Cluster |
If a Credis_Cluster object exists, return it. Otherwise create one and return it. |
|
getHost ( ) : string |
|
|
getMasterAddressByName ( string $name ) : mixed |
Get the hostname and port for a specific master |
|
getMasterClient ( string $name ) : Credis_Client |
If a Credis_Client object exists for a master, return it. Otherwise create one and return it |
|
getPort ( ) : integer |
|
|
getSlaveClients ( string $name ) : Credis_Client[] |
If an array of Credis_Client objects exist for a set of slaves, return them. Otherwise create and return them |
|
master ( string $name ) : mixed |
Get the information for a specific master |
|
masters ( ) : mixed |
Return information about all registered master servers |
|
ping ( ) : mixed |
Check if the Sentinel is still responding |
|
setClientDatabase ( integer $db ) |
|
|
setClientPassword ( null | string $password ) |
|
|
setClientPersistent ( string $persistent ) |
|
|
setClientTimeout ( float $timeout ) |
|
|
slaves ( string $name ) : mixed |
Return all information for slaves that are associated with a single master |
|