コード例 #1
0
ファイル: TaskSchedulerImpl.java プロジェクト: ondrocks/perun
 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));
 }
コード例 #2
0
ファイル: TaskSchedulerImpl.java プロジェクト: ondrocks/perun
 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));
 }
コード例 #3
0
ファイル: AuditParser.java プロジェクト: papperwing/perun
 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;
 }
コード例 #4
0
ファイル: DenialsResolverImpl.java プロジェクト: Holdo/perun
 @Override
 public boolean isExecServiceDeniedOnDestination(ExecService execService, int destination)
     throws InternalErrorException {
   return execServiceDenialDao.isExecServiceDeniedOnDestination(execService.getId(), destination);
 }
コード例 #5
0
ファイル: DenialsResolverImpl.java プロジェクト: Holdo/perun
 @Override
 public boolean isExecServiceDeniedOnFacility(ExecService execService, Facility facility)
     throws InternalErrorException {
   return execServiceDenialDao.isExecServiceDeniedOnFacility(
       execService.getId(), facility.getId());
 }