static void Main(string[] args) { int result = JumpHash.JumpConsistentHash(3, 15); Console.WriteLine($"buckets: {result}"); result = JumpHash.JumpConsistentHash(3, 17); Console.WriteLine($"buckets: {result}"); var ip = "192.168.1.10"; Console.WriteLine(ip.GetHashCode()); result = JumpHash.JumpConsistentHash(ip, 20); Console.WriteLine($"buckets: {result}"); Console.WriteLine(ip.GetHashCode()); result = JumpHash.JumpConsistentHash(ip, 22); Console.WriteLine($"buckets: {result}"); }
public int GetJumpHashTimeDifference() { return(JumpHash.JumpConsistentHash(Convert.ToUInt64(Major) + Convert.ToUInt64(Minor), AppConstants.NumberOfGroup)); }
public int GetJumpHashTime() { return(JumpHash.JumpConsistentHash(JumpConsistentSeed, 86400)); }
public int GetJumpHashTimeDifference() { return(JumpHash.JumpConsistentHash(JumpConsistentSeed, AppConstants.NumberOfGroup)); }