/** * Is this node instance a suitable candidate for the specific role? * @param role role ID * @param label label which must match, or "" for no label checks * @return true if the node has space for this role, is running and the labels * match. */ public boolean canHost(int role, String label) { return isOnline() && (SliderUtils.isUnset(label) || label.equals(nodeLabels)) // label match && getOrCreate(role).isAvailable(); // no live role }
/** * Is this node instance a suitable candidate for the specific role? * @param role role ID * @param label label which must match, or "" for no label checks * @return true if the node has space for this role, is running and the labels * match. */ public boolean canHost(int role, String label) { return isOnline() && (SliderUtils.isUnset(label) || label.equals(nodeLabels)) // label match && getOrCreate(role).isAvailable(); // no live role }
|| (candidate.isOnline() && !candidate.exceedsFailureThreshold(role))) { targets.remove(i);
|| (candidate.isOnline() && !candidate.exceedsFailureThreshold(role))) { targets.remove(i);