Move the hash generator inside the command hash strategy class.

This should make things a tiny bit faster (we are speaking about micro
optimizations anyway) but more  importantly it results in a better
encapsulation.
This commit is contained in:
Daniele Alessandri
2012-07-30 15:09:51 +02:00
parent f4f9d02551
commit 7683f97ff2
11 changed files with 162 additions and 131 deletions
@@ -17,7 +17,7 @@ namespace Predis\Distribution;
*
* @author Daniele Alessandri <suppakilla@gmail.com>
*/
interface DistributionStrategyInterface extends HashGeneratorInterface
interface DistributionStrategyInterface
{
/**
* Adds a node to the distributor with an optional weight.
@@ -40,4 +40,11 @@ interface DistributionStrategyInterface extends HashGeneratorInterface
* @return mixed
*/
public function get($key);
/**
* Returns the underlying hash generator instance.
*
* @return HashGeneratorInterface
*/
public function getHashGenerator();
}