Examples of invokeAll()


Examples of com.exedosoft.plat.bo.DOService.invokeAll()

    /**
     * 执行用户定义的特定登录Action 如 LoginAction2 LoginAction等。
     */

    try {
      returnValue = curService.invokeAll();
    } catch (Exception e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }

View Full Code Here

Examples of com.google.common.util.concurrent.ListeningExecutorService.invokeAll()

      }
    }

    ListeningExecutorService es = MoreExecutors.listeningDecorator(Executors.newCachedThreadPool());
    try {
      List<Future<PipelineCallable.Status>> res = es.invokeAll(callablesToRun);
      for (int i = 0; i < res.size(); i++) {
        if (res.get(i).get() != PipelineCallable.Status.SUCCESS) {
          failedCallables.add((PipelineCallable) callablesToRun.get(i));
        }
      }
View Full Code Here

Examples of com.google.common.util.concurrent.ListeningScheduledExecutorService.invokeAll()

      @Override public Boolean call() {
        taskDone = true;
        return taskDone;
      }
    };
    List<Future<Boolean>> futureList = executor.invokeAll(
        ImmutableList.of(task), 10, TimeUnit.MILLISECONDS);
    Future<Boolean> future = futureList.get(0);
    assertFalse(taskDone);
    assertTrue(future.isDone());
    try {
View Full Code Here

Examples of com.hazelcast.core.IExecutorService.invokeAll()

        String msg = randomString();
        Collection<Callable<String>> collection = new ArrayList<Callable<String>>();
        collection.add(new AppendCallable(msg));
        collection.add(new AppendCallable(msg));

        List<Future<String>> results =  service.invokeAll(collection);
        for (Future<String> result : results) {
            assertEquals(msg + AppendCallable.APPENDAGE, result.get());
        }
    }
View Full Code Here

Examples of com.tangosol.net.NamedCache.invokeAll()

      }
    }
   
    for(Map.Entry<String, List<Object>> entry :  updateMap.entrySet()) {
      NamedCache cache = getVersionedCache(entry.getKey());
      cache.invokeAll(entry.getValue(), new RollbackProcessor(activeTx));
      cache.keySet().removeAll(markerMap.get(entry.getKey()));
    }
   
    activeTx = null;
  }
View Full Code Here

Examples of com.tangosol.net.NamedCache.invokeAll()

      }
    }
   
    for(Map.Entry<String, List<Object>> entry :  updateMap.entrySet()) {
      NamedCache cache = getVersionedCache(entry.getKey());
      cache.invokeAll(entry.getValue(), new RecycleProcessor(minVersion - 1));
      cache.keySet().removeAll(markerMap.get(entry.getKey()));
    }
  }
}
View Full Code Here

Examples of java.util.concurrent.ExecutorService.invokeAll()

          return fieldMap.getSrcPropertyDescriptor(String.class);
        }
      });
    }

    executorService.invokeAll(callables);
    Thread.sleep(1000);
    executorService.shutdown();
  }

  @Test
View Full Code Here

Examples of java.util.concurrent.ExecutorService.invokeAll()

          assertNotNull(processor);
          return null;
        }
      });
    }
    executorService.invokeAll(callables);
    assertEquals(1, mapper.getCalls());
    assertTrue(exceptions.isEmpty());
  }

  @Test
View Full Code Here

Examples of java.util.concurrent.ExecutorService.invokeAll()

        }
        // Loop until all images are downloaded or timeout is reached
        long totalTimeout = DOWNLOAD_TIMEOUT + DOWNLOAD_TIMEOUT_ONE_TILE * tiles.size();
        log.debug("=== total timeout (millis): {}", totalTimeout);
        ExecutorService service = Executors.newFixedThreadPool(DOWNLOAD_MAX_THREADS);
        List<Future<ImageResult>> futures = service.invokeAll(callables, totalTimeout, TimeUnit.MILLISECONDS);
        // determine the pixel bounds of the mosaic
        Bbox pixelBounds = getPixelBounds(tiles);
        // create the images for the mosaic
        List<RenderedImage> images = new ArrayList<RenderedImage>();
        for (Future<ImageResult> future : futures) {
View Full Code Here

Examples of java.util.concurrent.ExecutorService.invokeAll()

          }
          // Loop until all images are downloaded or timeout is reached
          long totalTimeout = DOWNLOAD_TIMEOUT + DOWNLOAD_TIMEOUT_ONE_TILE * tiles.size();
          log.debug("=== total timeout (millis): {}", totalTimeout);
          ExecutorService service = Executors.newFixedThreadPool(DOWNLOAD_MAX_THREADS);
          List<Future<ImageResult>> futures = service.invokeAll(callables, totalTimeout,
              TimeUnit.MILLISECONDS);
          // determine the pixel bounds of the mosaic
          Bbox pixelBounds = getPixelBounds(tiles);
          int imageWidth = configurationService.getRasterLayerInfo(getLayerId()).getTileWidth();
          int imageHeight = configurationService.getRasterLayerInfo(getLayerId()).getTileHeight();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.