PHP Class Predis\Cluster\Distributor\KetamaRing

Author: Daniele Alessandri ([email protected])
Author: Lorenzo Castelli ([email protected])
Inheritance: extends HashRing
Datei anzeigen Open project: tillkruss/redis-object-cache

Public Methods

Method Description
__construct ( mixed $nodeHashCallback = null )
hash ( $value )

Protected Methods

Method Description
addNodeToRing ( &$ring, $node, $totalNodes, $replicas, $weightRatio )
wrapAroundStrategy ( $upper, $lower, $ringKeysCount )

Method Details

__construct() public method

public __construct ( mixed $nodeHashCallback = null )
$nodeHashCallback mixed Callback returning a string used to calculate the hash of nodes.

addNodeToRing() protected method

protected addNodeToRing ( &$ring, $node, $totalNodes, $replicas, $weightRatio )

hash() public method

public hash ( $value )

wrapAroundStrategy() protected method

protected wrapAroundStrategy ( $upper, $lower, $ringKeysCount )