public void updateIfNotNull(
            String zone,
            String name,
            Boolean isSeed,
            Boolean isLeaderEligible,
            Integer priority,
            String memberHost,
            String adminApiAddress,
            String wsAddress,
            String tcpAddress,
            String udpAddress,
            // Status
            Boolean hasJoinedCluster,
            Boolean isActive,
            Boolean isHealthy,
            Date lastHeartbeatDate) {
        if (zone != null) {
            this.zone = zone;
        }
        if (name != null) {
            this.name = name;
        }
        if (isSeed != null) {
            this.isSeed = isSeed;
        }
        if (isLeaderEligible != null) {
            this.isLeaderEligible = isLeaderEligible;
        }
        if (priority != null) {
            this.priority = priority;
        }
        if (memberHost != null) {
            this.memberHost = memberHost;
        }
        if (adminApiAddress != null) {
            this.adminApiAddress = adminApiAddress;
        }
        if (wsAddress != null) {
            this.wsAddress = wsAddress;
        }
        if (tcpAddress != null) {
            this.tcpAddress = tcpAddress;
        }
        if (udpAddress != null) {
            this.udpAddress = udpAddress;
        }
        // Status
        if (hasJoinedCluster != null) {
            status.setHasJoinedCluster(hasJoinedCluster);
        }
        if (isActive != null) {
            status.setIsActive(isActive);
        }
        if (isHealthy != null) {
            status.setIsHealthy(isHealthy);
        }
        if (lastHeartbeatDate != null) {
            status.setLastHeartbeatDate(lastHeartbeatDate);
        }
    }
The priority to be a leader. 1. When there is no leader, a qualified (active,
leader-eligible, and nodeType=SERVICE) member with the highest priority will be selected as a
leader. 2. When there is a leader, even if a new qualified member with a higher priority
joins, the new member will NOT be elected as a new leader immediately until the existing
leader dies, or a developer triggers a new leader election manually via admin API.
turms-server-common/src/main/java/im/turms/server/common/infra/cluster/service/config/entity/discovery/Member.java