@SuppressWarnings("checkstyle:npathcomplexity") private boolean checkJoinRequest(JoinRequest joinRequest, Connection connection) { if (checkIfJoinRequestFromAnExistingMember(joinRequest, connection)) { return true; } final InternalHotRestartService hotRestartService = node.getNodeExtension().getInternalHotRestartService(); Address target = joinRequest.getAddress(); String targetUuid = joinRequest.getUuid(); if (hotRestartService.isMemberExcluded(target, targetUuid)) { logger.fine("cannot join " + target + " because it is excluded in cluster start."); hotRestartService.notifyExcludedMember(target); return true; } if (joinRequest.getExcludedMemberUuids().contains(clusterService.getThisUuid())) { logger.warning("cannot join " + target + " since this node is excluded in its list..."); hotRestartService.handleExcludedMemberUuids(target, joinRequest.getExcludedMemberUuids()); return true; } return checkClusterStateBeforeJoin(target, targetUuid); }
@SuppressWarnings("checkstyle:npathcomplexity") private boolean checkJoinRequest(JoinRequest joinRequest, Connection connection) { if (checkIfJoinRequestFromAnExistingMember(joinRequest, connection)) { return true; } final InternalHotRestartService hotRestartService = node.getNodeExtension().getInternalHotRestartService(); Address target = joinRequest.getAddress(); String targetUuid = joinRequest.getUuid(); if (hotRestartService.isMemberExcluded(target, targetUuid)) { logger.fine("cannot join " + target + " because it is excluded in cluster start."); hotRestartService.notifyExcludedMember(target); return true; } if (checkClusterStateBeforeJoin(target, targetUuid)) { return true; } if (joinRequest.getExcludedMemberUuids().contains(clusterService.getThisUuid())) { logger.warning("cannot join " + target + " since this node is excluded in its list..."); hotRestartService.handleExcludedMemberUuids(target, joinRequest.getExcludedMemberUuids()); return true; } if (!node.getPartitionService().isMemberAllowedToJoin(target)) { logger.warning(target + " not allowed to join right now, it seems restarted."); return true; } return false; }