public override int GetHashSlot(ServerSelectionStrategy serverSelectionStrategy) { var slot = serverSelectionStrategy.HashSlot(Key); slot = serverSelectionStrategy.CombineSlot(slot, key1); return(serverSelectionStrategy.CombineSlot(slot, key2)); }
public override int GetHashSlot(ServerSelectionStrategy serverSelectionStrategy) { int slot = ServerSelectionStrategy.NoSlot; for (int i = 0; i < keys.Length; i++) { slot = serverSelectionStrategy.CombineSlot(slot, keys[i]); } return(slot); }
public override int GetHashSlot(ServerSelectionStrategy serverSelectionStrategy) { int slot = ServerSelectionStrategy.NoSlot; for (int i = 0; i < conditions.Length; i++) { int newSlot = conditions[i].Condition.GetHashSlot(serverSelectionStrategy); slot = serverSelectionStrategy.CombineSlot(slot, newSlot); if (slot == ServerSelectionStrategy.MultipleSlots) { return(slot); } } for (int i = 0; i < operations.Length; i++) { int newSlot = operations[i].Wrapped.GetHashSlot(serverSelectionStrategy); slot = serverSelectionStrategy.CombineSlot(slot, newSlot); if (slot == ServerSelectionStrategy.MultipleSlots) { return(slot); } } return(slot); }