Source:
public AppStateClusterImpl(AppSettings appSettings) { ClusterProperties clusterProperties = new ClusterProperties(appSettings); clusterProperties.validate(); if (!clusterProperties.isEnabled()) { throw new IllegalStateException("Cluster is not enabled on this instance"); } Config hzConfig = new Config(); try { hzConfig.setInstanceName(InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { } hzConfig.getGroupConfig().setName(clusterProperties.getName()); NetworkConfig netConfig = hzConfig.getNetworkConfig(); netConfig .setPort(clusterProperties.getPort()) .setReuseAddress(true); if (!clusterProperties.getNetworkInterfaces().isEmpty()) { netConfig.getInterfaces() .setEnabled(true) .setInterfaces(clusterProperties.getNetworkInterfaces()); } JoinConfig joinConfig = netConfig.getJoin(); joinConfig.getAwsConfig().setEnabled(false); joinConfig.getMulticastConfig().setEnabled(false); joinConfig.getTcpIpConfig().setEnabled(true); joinConfig.getTcpIpConfig().setMembers(clusterProperties.getHosts()); hzConfig .setProperty("hazelcast.tcp.join.port.try.count", "10") .setProperty("hazelcast.socket.bind.any", "false") .setProperty("hazelcast.phone.home.enabled", "false") .setProperty("hazelcast.logging.type", "slf4j"); hzConfig.getMemberAttributeConfig() .setStringAttribute(SONARQUBE_VERSION, getSonarqubeVersion()); hzConfig.getPartitionGroupConfig().setEnabled(false); hzInstance = Hazelcast.newHazelcastInstance(hzConfig); operationalProcesses = hzInstance.getReplicatedMap(OPERATIONAL_PROCESSES); listenerUuid = operationalProcesses.addEntryListener(new OperationalProcessListener()); checkSonarQubeClusterVersion(getSonarqubeVersion()); }

Target:
public AppStateClusterImpl(AppSettings appSettings) { ClusterProperties clusterProperties = new ClusterProperties(appSettings); clusterProperties.validate(); if (!clusterProperties.isEnabled()) { throw new IllegalStateException("Cluster is not enabled on this instance"); } Config hzConfig = new Config(); try { hzConfig.setInstanceName(InetAddress.getLocalHost().getHostName()); } catch (UnknownHostException e) { } hzConfig.getGroupConfig().setName(clusterProperties.getName()); NetworkConfig netConfig = hzConfig.getNetworkConfig(); netConfig .setPort(clusterProperties.getPort()) .setReuseAddress(true); if (!clusterProperties.getNetworkInterfaces().isEmpty()) { netConfig.getInterfaces() .setEnabled(true) .setInterfaces(clusterProperties.getNetworkInterfaces()); } JoinConfig joinConfig = netConfig.getJoin(); joinConfig.getAwsConfig().setEnabled(false); joinConfig.getMulticastConfig().setEnabled(false); joinConfig.getTcpIpConfig().setEnabled(true); joinConfig.getTcpIpConfig().setMembers(clusterProperties.getHosts()); hzConfig .setProperty("hazelcast.tcp.join.port.try.count", "10") .setProperty("hazelcast.socket.bind.any", "false") .setProperty("hazelcast.phone.home.enabled", "false") .setProperty("hazelcast.logging.type", "slf4j"); hzConfig.getPartitionGroupConfig().setEnabled(false); hzInstance = Hazelcast.newHazelcastInstance(hzConfig); operationalProcesses = hzInstance.getReplicatedMap(OPERATIONAL_PROCESSES); listenerUuid = operationalProcesses.addEntryListener(new OperationalProcessListener()); }