PHP Class RedisArray

Mostra file Open project: ukko/phpredis-phpdoc Class Usage Examples

Public Methods

Method Description
__construct ( string $name = '', array $hosts = NULL, array $opts = NULL ) Constructor
_function ( ) : string
_hosts ( ) : array
_rehash ( ) Use this function when a new node is added and keys need to be rehashed.
_target ( string $key ) : string

Method Details

__construct() public method

Constructor
public __construct ( string $name = '', array $hosts = NULL, array $opts = NULL )
$name string Name of the redis array to create (required if using redis.ini to define array)
$hosts array Array of hosts to construct the array with
$opts array Array of options

_function() public method

public _function ( ) : string
return string the name of the function used to extract key parts during consistent hashing

_hosts() public method

public _hosts ( ) : array
return array list of hosts for the selected array

_rehash() public method

Use this function when a new node is added and keys need to be rehashed.
public _rehash ( )

_target() public method

public _target ( string $key ) : string
$key string The key for which you want to lookup the host
return string the host to be used for a certain key