private static JoinConfig createDefaultJoinConfig(final HazelcastClusterProperties cluster) {
        val tcpIpConfig = new TcpIpConfig()
            .setEnabled(cluster.getNetwork().isTcpipEnabled())
            .setMembers(cluster.getNetwork().getMembers())
            .setConnectionTimeoutSeconds(cluster.getCore().getTimeout());
        LOGGER.trace("Created Hazelcast TCP/IP configuration [{}] for members [{}]", tcpIpConfig, cluster.getNetwork().getMembers());

        val multicast = cluster.getDiscovery().getMulticast();
        val multicastConfig = new MulticastConfig().setEnabled(multicast.isEnabled());
        if (multicast.isEnabled()) {
            LOGGER.debug("Created Hazelcast Multicast configuration [{}]", multicastConfig);
            multicastConfig.setMulticastGroup(multicast.getGroup());
            multicastConfig.setMulticastPort(multicast.getPort());

            val trustedInterfaces = StringUtils.commaDelimitedListToSet(multicast.getTrustedInterfaces());
            if (!trustedInterfaces.isEmpty()) {
                multicastConfig.setTrustedInterfaces(trustedInterfaces);
            }
            multicastConfig.setMulticastTimeoutSeconds(multicast.getTimeout());
            multicastConfig.setMulticastTimeToLive(multicast.getTimeToLive());
        } else {
            LOGGER.debug("Skipped Hazelcast Multicast configuration since feature is disabled");
        }

        return new JoinConfig()
            .setMulticastConfig(multicastConfig)
            .setTcpIpConfig(tcpIpConfig);
    }
Build config.

@param hz the hz
@return the config
support/cas-server-support-hazelcast-core/src/main/java/org/apereo/cas/hz/HazelcastConfigurationFactory.java