public void setLocalExecutionLimitations(NodeType node) { setLocalExecutionLimitations(quartzScheduler, node.getTaskExecutionLimitations()); }
private static Integer getNodeLimitation(NodeType node, String group) { if (node.getTaskExecutionLimitations() == null) { return null; } group = MiscUtil.nullIfEmpty(group); for (TaskGroupExecutionLimitationType limit : node.getTaskExecutionLimitations().getGroupLimitation()) { if (Objects.equals(group, MiscUtil.nullIfEmpty(limit.getGroupName()))) { return limit.getLimit(); } } for (TaskGroupExecutionLimitationType limit : node.getTaskExecutionLimitations().getGroupLimitation()) { if (TaskConstants.LIMIT_FOR_OTHER_GROUPS.equals(limit.getGroupName())) { return limit.getLimit(); } } return null; }
@Override public void schedulerStarting() { OperationResult result = new OperationResult(LocalNodeManager.class.getName() + ".schedulerStarting"); NodeType node = taskManager.getClusterManager().getFreshVerifiedLocalNodeObject(result); if (node != null) { Scheduler quartzScheduler = taskManager.getExecutionManager().getQuartzScheduler(); if (quartzScheduler != null) { getGlobalExecutionManager().setLocalExecutionLimitations(quartzScheduler, node.getTaskExecutionLimitations()); } } else { LOGGER.warn("Couldn't set Quartz scheduler execution capabilities, because local node object couldn't be correctly read."); } } }
PrismObject<NodeType> nodeInRepo = nodesInRepo.get(0); nodeToBe.setTaskExecutionLimitations(nodeInRepo.asObjectable().getTaskExecutionLimitations()); nodeToBe.setUrl(nodeInRepo.asObjectable().getUrl()); ObjectDelta<NodeType> nodeDelta = nodeInRepo.diff(nodeToBe.asPrismObject(), EquivalenceStrategy.LITERAL);