private void justWait(Facility facility, ExecService execService) { // we are gonna wait... log.debug( " ExecService to be put to sleep in schedulingPool: execService [" + execService.getId() + "]"); schedulingPool.addToPool(new Pair<ExecService, Facility>(execService, facility)); }
private void scheduleItAndWait(ExecService dependency, Facility facility, ExecService execService) throws InternalErrorException { // We are gonna propagate this dependency... propagateService(dependency, new Date(System.currentTimeMillis()), facility); // ...and wait... log.debug( " ExecService to be put to sleep in schedulingPool: execService [" + execService.getId() + "]"); schedulingPool.addToPool(new Pair<ExecService, Facility>(execService, facility)); }
private static ExecService createExecService(Map<String, String> beanAttr) { if (beanAttr == null) return null; ExecService execService = new ExecService(); execService.setId(Integer.valueOf(beanAttr.get("id")).intValue()); Service service; if (beanAttr.get("service").equals("\\0")) service = null; else { List<Pair<String, Map<String, String>>> serviceList = beansToMap(beanAttr.get("service")); service = createService(serviceList.get(0).getRight()); } execService.setService(service); ExecService.ExecServiceType exType; if (beanAttr.get("type").equals("\\0")) exType = null; else { String type = beanAttr.get("type"); if (type.equals("GENERATE")) exType = ExecServiceType.GENERATE; else if (type.equals("SEND")) exType = ExecServiceType.SEND; else exType = null; } execService.setExecServiceType(exType); return execService; }
@Override public boolean isExecServiceDeniedOnDestination(ExecService execService, int destination) throws InternalErrorException { return execServiceDenialDao.isExecServiceDeniedOnDestination(execService.getId(), destination); }
@Override public boolean isExecServiceDeniedOnFacility(ExecService execService, Facility facility) throws InternalErrorException { return execServiceDenialDao.isExecServiceDeniedOnFacility( execService.getId(), facility.getId()); }