HCOLL-134 more work on node discovery

This commit is contained in:
Rob Austin
2014-11-18 15:08:40 +00:00
parent 825668e126
commit 1874c4c127
7 changed files with 134 additions and 38 deletions
@@ -238,12 +238,16 @@ public class NodeDiscovery {
}
};
// remove self
final HashSet<AddressAndPort> knownHostPorts0 = new HashSet<>(knownHostPorts);
knownHostPorts0.remove(ourAddressAndPort);
// add our identifier and host:port to the list of known identifiers
knownNodes.add(ourAddressAndPort, identifier);
final TcpTransportAndNetworkConfig tcpConfig = TcpTransportAndNetworkConfig
.of(ourAddressAndPort.getPort(),
toInetSocketCollection(knownHostPorts))
toInetSocketCollection(knownHostPorts0))
.heartBeatInterval(1, SECONDS);