RedisSentinel

Interface for sentinel commands

package

Default

Methods

__construct

__construct() 

Check if the current Sentinel configuration is able to reach the quorum needed to failover a master, and the majority needed to authorize the failover. This command should be used in monitoring systems to check if a Sentinel deployment is ok.

ckquorum( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

Close the client - when it is fully closed the handler will be called.

close( $arg0) : void

Arguments

$arg0

callable

create

create( $arg0,  $arg1) : \io\vertx\jphp\redis\sentinel\RedisSentinel
static

Arguments

$arg0

Vertx

$arg1

array | RedisOptions

Response

\io\vertx\jphp\redis\sentinel\RedisSentinel

Force a failover as if the master was not reachable, and without asking for agreement to other Sentinels (however a new version of the configuration will be published so that the other Sentinels will update their configurations)

failover( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

Force Sentinel to rewrite its configuration on disk, including the current Sentinel state.

flushConfig( $arg0) : $this

Normally Sentinel rewrites the configuration every time something changes in its state (in the context of the subset of the state which is persisted on disk across restart). However sometimes it is possible that the configuration file is lost because of operation errors, disk failures, package upgrade scripts or configuration managers. In those cases a way to to force Sentinel to rewrite the configuration file is handy. This command works even if the previous configuration file is completely missing.

Arguments

$arg0

callable

Response

$this

Return the ip and port number of the master with that name.

getMasterAddrByName( $arg0,  $arg1) : $this

If a failover is in progress or terminated successfully for this master it returns the address and port of the promoted slave

Arguments

$arg0

string

$arg1

callable

Response

$this

Show the state and info of the specified master

master( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

Show a list of monitored masters and their state

masters( $arg0) : $this

Arguments

$arg0

callable

Response

$this

Reset all the masters with matching name.

reset( $arg0,  $arg1) : $this

The pattern argument is a glob-style pattern. The reset process clears any previous state in a master (including a failover in pro

Arguments

$arg0

string

$arg1

callable

Response

$this

Show a list of sentinel instances for this master, and their state

sentinels( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this

Show a list of slaves for this master, and their state

slaves( $arg0,  $arg1) : $this

Arguments

$arg0

string

$arg1

callable

Response

$this