PHP 클래스 Bravo3\Orm\Drivers\Redis\SentinelMonitor

파일 보기 프로젝트 열기: bravo3/orm

보호된 프로퍼티들

프로퍼티 타입 설명
$client Predis\Client

공개 메소드들

메소드 설명
__construct ( mixed $connection_params = null ) Create a new Sentinel Monitor.
findMasters ( ) : array Return an array of MASTER servers in the form that can be passed to Predis Client.
findSentinels ( string $master_name = 'mymaster' ) : array Return an array of SENTINEL servers in the form that can be passed to Predis Client.
findSlaves ( string $master_name = null ) : array Return an array of SLAVE servers in the form that can be passed to Predis Client.

보호된 메소드들

메소드 설명
getConnectionParams ( array $sentinel_output, string $alias = null ) : array | null Return an array of formatted output from Sentinel to be used as Redis connection parameters for the Predis client.
validateConnection ( array $host_info ) : boolean Function returns true if connection to redis host is accessible based on the output received from Sentinel.

메소드 상세

__construct() 공개 메소드

If more than one sentinel server parameters are provided, the first sentinel that connects will be used for retrival of information.
public __construct ( mixed $connection_params = null )
$connection_params mixed

findMasters() 공개 메소드

Return an array of MASTER servers in the form that can be passed to Predis Client.
public findMasters ( ) : array
리턴 array

findSentinels() 공개 메소드

Return an array of SENTINEL servers in the form that can be passed to Predis Client.
public findSentinels ( string $master_name = 'mymaster' ) : array
$master_name string
리턴 array

findSlaves() 공개 메소드

If $master_name parameter is not set this function will return slaves attached to all connected master servers.
public findSlaves ( string $master_name = null ) : array
$master_name string
리턴 array

getConnectionParams() 보호된 메소드

Inactive connection parameters will be removed if sentinel reports services as inactive.
protected getConnectionParams ( array $sentinel_output, string $alias = null ) : array | null
$sentinel_output array
$alias string Redis DB connection type "master" or "slave"
리턴 array | null

validateConnection() 보호된 메소드

Function returns true if connection to redis host is accessible based on the output received from Sentinel.
protected validateConnection ( array $host_info ) : boolean
$host_info array
리턴 boolean

프로퍼티 상세

$client 보호되어 있는 프로퍼티

protected Client,Predis $client
리턴 Predis\Client