Fix typos and string concat in Topology
This commit is contained in:
parent
3c6e213f66
commit
545e67fc96
|
@ -258,7 +258,7 @@ public final class Topology
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
/*
|
/*
|
||||||
* always add the backup, better to try to reconnect to something thats not there then to
|
* always add the backup, better to try to reconnect to something that's not there then to
|
||||||
* not know about it at all
|
* not know about it at all
|
||||||
*/
|
*/
|
||||||
if (currentMember.getBackup() == null && memberInput.getBackup() != null)
|
if (currentMember.getBackup() == null && memberInput.getBackup() != null)
|
||||||
|
@ -322,7 +322,7 @@ public final class Topology
|
||||||
ArrayList<ClusterTopologyListener> listenersCopy;
|
ArrayList<ClusterTopologyListener> listenersCopy;
|
||||||
synchronized (topologyListeners)
|
synchronized (topologyListeners)
|
||||||
{
|
{
|
||||||
listenersCopy = new ArrayList<ClusterTopologyListener>(topologyListeners);
|
listenersCopy = new ArrayList<>(topologyListeners);
|
||||||
}
|
}
|
||||||
return listenersCopy;
|
return listenersCopy;
|
||||||
}
|
}
|
||||||
|
@ -454,7 +454,7 @@ public final class Topology
|
||||||
ArrayList<TopologyMemberImpl> members;
|
ArrayList<TopologyMemberImpl> members;
|
||||||
synchronized (this)
|
synchronized (this)
|
||||||
{
|
{
|
||||||
members = new ArrayList<TopologyMemberImpl>(topology.values());
|
members = new ArrayList<>(topology.values());
|
||||||
}
|
}
|
||||||
return members;
|
return members;
|
||||||
}
|
}
|
||||||
|
@ -484,11 +484,11 @@ public final class Topology
|
||||||
private synchronized String describe(final String text)
|
private synchronized String describe(final String text)
|
||||||
{
|
{
|
||||||
StringBuilder desc = new StringBuilder(text + "topology on " + this + ":\n");
|
StringBuilder desc = new StringBuilder(text + "topology on " + this + ":\n");
|
||||||
for (Entry<String, TopologyMemberImpl> entry : new HashMap<String, TopologyMemberImpl>(topology).entrySet())
|
for (Entry<String, TopologyMemberImpl> entry : new HashMap<>(topology).entrySet())
|
||||||
{
|
{
|
||||||
desc.append("\t" + entry.getKey() + " => " + entry.getValue() + "\n");
|
desc.append("\t").append(entry.getKey()).append(" => ").append(entry.getValue()).append("\n");
|
||||||
}
|
}
|
||||||
desc.append("\t" + "nodes=" + nodes() + "\t" + "members=" + members());
|
desc.append("\t" + "nodes=").append(nodes()).append("\t").append("members=").append(members());
|
||||||
if (topology.isEmpty())
|
if (topology.isEmpty())
|
||||||
{
|
{
|
||||||
desc.append("\tEmpty");
|
desc.append("\tEmpty");
|
||||||
|
@ -535,7 +535,7 @@ public final class Topology
|
||||||
{
|
{
|
||||||
if (mapDelete == null)
|
if (mapDelete == null)
|
||||||
{
|
{
|
||||||
mapDelete = new ConcurrentHashMap<String, Long>();
|
mapDelete = new ConcurrentHashMap<>();
|
||||||
}
|
}
|
||||||
return mapDelete;
|
return mapDelete;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue