Merge pull request #755 from HeartSaVioR/remove-redundant-synchronize-from-jedis-cluster-info-cache

Remove redundant synchronized from JedisClusterInfoCache
This commit is contained in:
Jungtaek Lim
2014-09-29 08:19:25 +09:00

View File

@@ -118,7 +118,7 @@ public class JedisClusterInfoCache {
}
}
public synchronized void assignSlotsToNode(List<Integer> targetSlots,
public void assignSlotsToNode(List<Integer> targetSlots,
HostAndPort targetNode) {
w.lock();
try {
@@ -137,7 +137,7 @@ public class JedisClusterInfoCache {
}
}
public synchronized JedisPool getNode(String nodeKey) {
public JedisPool getNode(String nodeKey) {
r.lock();
try {
return nodes.get(nodeKey);
@@ -146,7 +146,7 @@ public class JedisClusterInfoCache {
}
}
public synchronized JedisPool getSlotPool(int slot) {
public JedisPool getSlotPool(int slot) {
r.lock();
try {
return slots.get(slot);
@@ -155,7 +155,7 @@ public class JedisClusterInfoCache {
}
}
public synchronized Map<String, JedisPool> getNodes() {
public Map<String, JedisPool> getNodes() {
r.lock();
try {
return new HashMap<String, JedisPool>(nodes);