public boolean isCompatible(ConfigCheck other) {
if (!groupName.equals(other.groupName)) {
return false;
}
if (!groupPassword.equals(other.groupPassword)) {
throw new HazelcastException("Incompatible group password!");
}
if (!joinerType.equals(other.joinerType)) {
throw new HazelcastException("Incompatible joiners! " + joinerType + " -vs- " + other.joinerType);
}
if (!partitionGroupEnabled && other.partitionGroupEnabled
|| partitionGroupEnabled && !other.partitionGroupEnabled) {
throw new HazelcastException("Incompatible partition groups! " +
"this: " + (partitionGroupEnabled ? "enabled" : "disabled") + " / " + memberGroupType +
", other: " + (other.partitionGroupEnabled ? "enabled" : "disabled") + " / " + other.memberGroupType);
}
if (partitionGroupEnabled && memberGroupType != other.memberGroupType) {
throw new HazelcastException("Incompatible partition groups! this: " + memberGroupType + ", other: " + other.memberGroupType);
}
return true;
}