public boolean isValid() {
        final Set<PeerId> intersection = new HashSet<>(this.peers);
        intersection.retainAll(this.learners);
        return !this.peers.isEmpty() && intersection.isEmpty();
    }
Returns true when the configuration is valid.

@return true if the configuration is valid.
jraft-core/src/main/java/com/alipay/sofa/jraft/conf/Configuration.java