コード例 #1
0
 public void release(@NotNull Target target, @Nullable Parameters configuration) {
   ArrayList<ProcessHandler> handlers = new ArrayList<ProcessHandler>();
   synchronized (myProcMap) {
     for (Pair<Target, Parameters> pair : myProcMap.keySet()) {
       if (pair.first == target && (configuration == null || pair.second == configuration)) {
         ContainerUtil.addIfNotNull(myProcMap.get(pair).handler, handlers);
       }
     }
   }
   for (ProcessHandler handler : handlers) {
     handler.destroyProcess();
   }
   fireModificationCountChanged();
 }
コード例 #2
0
 public void stopAll(boolean wait) {
   ArrayList<ProcessHandler> allHandlers = new ArrayList<ProcessHandler>();
   synchronized (myProcMap) {
     for (Info o : myProcMap.values()) {
       ContainerUtil.addIfNotNull(o.handler, allHandlers);
     }
   }
   for (ProcessHandler handler : allHandlers) {
     handler.destroyProcess();
   }
   if (wait) {
     for (ProcessHandler handler : allHandlers) {
       handler.waitFor();
     }
   }
 }