compilation fixed

pull/382/head
Nikita 9 years ago
parent ade8ef7a05
commit d8beeab912

@ -303,11 +303,11 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager {
private void checkSlaveNodesChange(Collection<ClusterPartition> newPartitions) {
for (ClusterPartition newPart : newPartitions) {
for (ClusterPartition currentPart : lastPartitions.values()) {
for (final ClusterPartition currentPart : lastPartitions.values()) {
if (!newPart.getMasterAddress().equals(currentPart.getMasterAddress())) {
continue;
}
MasterSlaveEntry entry = getEntry(currentPart.getMasterAddr());
final MasterSlaveEntry entry = getEntry(currentPart.getMasterAddr());
Set<URI> removedSlaves = new HashSet<URI>(currentPart.getSlaveAddresses());
removedSlaves.removeAll(newPart.getSlaveAddresses());
@ -321,7 +321,7 @@ public class ClusterConnectionManager extends MasterSlaveConnectionManager {
Set<URI> addedSlaves = new HashSet<URI>(newPart.getSlaveAddresses());
addedSlaves.removeAll(currentPart.getSlaveAddresses());
for (URI uri : addedSlaves) {
for (final URI uri : addedSlaves) {
Future<Void> future = entry.addSlave(uri.getHost(), uri.getPort());
future.addListener(new FutureListener<Void>() {
@Override

@ -203,7 +203,7 @@ public class SentinelConnectionManager extends MasterSlaveConnectionManager {
String ip = parts[2];
String port = parts[3];
String slaveAddr = ip + ":" + port;
final String slaveAddr = ip + ":" + port;
// to avoid addition twice
if (slaves.putIfAbsent(slaveAddr, true) == null && config.getReadMode() == ReadMode.SLAVE) {

Loading…
Cancel
Save