@Test public void testUpdateNodes() { Set<NodeEndpoint> endpoints = new HashSet<>(); endpoints.add(new NodeEndpoint("A", "localhost", 2333)); endpoints.add(new NodeEndpoint("B", "localhost", 2334)); endpoints.add(new NodeEndpoint("C", "localhost", 2335)); NodeGroup group = new NodeGroup(endpoints, NodeId.of("A")); Set<NodeEndpoint> endpoints2 = new HashSet<>(); endpoints2.add(new NodeEndpoint("A", "localhost", 2333)); endpoints2.add(new NodeEndpoint("B", "localhost", 2334)); group.updateNodes(endpoints2); Assert.assertEquals(2, group.getCountOfMajor()); }
void updateNodes(Set<NodeEndpoint> endpoints) { memberMap = buildMemberMap(endpoints); logger.info("group change changed -> {}", memberMap.keySet()); }
NodeGroup { void updateNodes(Set<NodeEndpoint> endpoints) { memberMap = buildMemberMap(endpoints); logger.info("group change changed -> {}", memberMap.keySet()); } }
NodeGroup { void updateNodes(Set<NodeEndpoint> endpoints) { memberMap = buildMemberMap(endpoints); logger.info("group change changed -> {}", memberMap.keySet()); } NodeGroup(NodeEndpoint endpoint);   NodeGroup(Collection<NodeEndpoint> endpoints, NodeId selfId); }
NodeGroup { void updateNodes(Set<NodeEndpoint> endpoints) { memberMap = buildMemberMap(endpoints); logger.info("group change changed -> {}", memberMap.keySet()); } NodeGroup(NodeEndpoint endpoint);   NodeGroup(Collection<NodeEndpoint> endpoints, NodeId selfId);  }
NodeGroup { void updateNodes(Set<NodeEndpoint> endpoints) { memberMap = buildMemberMap(endpoints); logger.info("group change changed -> {}", memberMap.keySet()); } NodeGroup(NodeEndpoint endpoint);   NodeGroup(Collection<NodeEndpoint> endpoints, NodeId selfId);   }