mirror of
https://github.com/predis/predis.git
synced 2026-10-17 09:15:51 +00:00
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:
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user