ref[provider]: refactor consistent hash load balancing

This commit is contained in:
godotg
2024-01-20 17:40:12 +08:00
parent 471f0611e7
commit d5249ed904
5 changed files with 41 additions and 61 deletions
@@ -53,6 +53,10 @@ public class HashSetLong extends AbstractSet<Long> {
return map.containsKey(o);
}
public boolean contains(long key) {
return map.containsKey(key);
}
@Override
public boolean add(Long e) {
return map.put(e, Boolean.TRUE) == null;