Examples of TaskExecutor


Examples of cl.niclabs.skandium.system.TaskExecutor

   */
  public Skandium(int maxThreads){
   
    if(maxThreads < 1) throw new IllegalArgumentException("The specified number of threads must be larger than 1");
   
    executor = new TaskExecutor(maxThreads);   
    eregis = new SkandiumEventRegistry();
  }
View Full Code Here

Examples of it.geosolutions.geobatch.task.TaskExecutor

        teConfig.setTimeOut(120000l);
//                teConfig.setVariables(getVariables());
        teConfig.setConfigDir(configDir);
        teConfig.setXsl(rasterizeConfig.getTaskExecutorXslFileName());

        TaskExecutor tea = new TaskExecutor(teConfig);
//        tea.setRunningContext(tempDir.getAbsolutePath());
        tea.setTempDir(tempDir);
        tea.setConfigDir(configDir);

        File outFile = SingleFileActionExecutor.execute(tea, inputFile);
        // taskexec just returns the input file

        if ( errorFile.length() != 0) {
View Full Code Here

Examples of it.sauronsoftware.cron4j.TaskExecutor

    req.setAttribute("executors", executors);
    // Action requested?
    String action = req.getParameter("action");
    if ("pause".equals(action)) {
      String id = req.getParameter("id");
      TaskExecutor executor = find(executors, id);
      if (executor != null && executor.isAlive() && !executor.isStopped()
          && executor.canBePaused() && !executor.isPaused()) {
        executor.pause();
      }
    } else if ("resume".equals(action)) {
      String id = req.getParameter("id");
      TaskExecutor executor = find(executors, id);
      if (executor != null && executor.isAlive() && !executor.isStopped()
          && executor.canBePaused() && executor.isPaused()) {
        executor.resume();
      }
    } else if ("stop".equals(action)) {
      String id = req.getParameter("id");
      TaskExecutor executor = find(executors, id);
      if (executor != null && executor.isAlive()
          && executor.canBeStopped() && !executor.isStopped()) {
        executor.stop();
      }
    }
    // Layout.
    String page = "/WEB-INF/ongoing.jsp";
    RequestDispatcher dispatcher = req.getRequestDispatcher(page);
View Full Code Here

Examples of org.apache.examples.panorama.startup.impl.TaskExecutor

{

    @Service( id="Startup" )
    public Runnable getStartupService()
    {
        TaskExecutor executor = new TaskExecutor();
        executor.setTasks(configuration("tasks", List.class));
        // Some of the logic which is automatically provided by the builder factory
        // must be done manually
        ErrorLog errorLog = new ErrorLogImpl(new DefaultErrorHandler(), LogFactory.getLog(TaskExecutor.class));
        executor.setErrorLog(errorLog);
        executor.setMessages(new MessageFormatter(PanoramaStartupModule.class, "panorama"));
        executor.setLog(LogFactory.getLog(TaskExecutor.class));
       
        return executor;
    }
View Full Code Here

Examples of org.apache.examples.panorama.startup.impl.TaskExecutor

        tasks.add(t2);

        MockControl logControl = newControl(Log.class);
        Log log = (Log) logControl.getMock();

        TaskExecutor e = new TaskExecutor();

        ErrorLog errorLog = (ErrorLog) newMock(ErrorLog.class);

        e.setErrorLog(errorLog);
        e.setLog(log);
        e.setMessages(getMessages());
        e.setTasks(tasks);

        // Note the ordering; explicitly set, to check that ordering does
        // take place.
        log.info("Executing task Fixture #2.");
        log.info("Executing task Fixture #1.");
        log.info("Executed 2 tasks \\(in \\d+ milliseconds\\)\\.");
        logControl.setMatcher(new RegexpMatcher());

        replayControls();

        e.run();

        assertListsEqual(new String[]
        { "f2", "f1" }, _tokens);

        verifyControls();
View Full Code Here

Examples of org.apache.examples.panorama.startup.impl.TaskExecutor

        log.info("Executed one task with one failure \\(in \\d+ milliseconds\\)\\.");
        logControl.setMatcher(new AggregateArgumentsMatcher(new RegexpMatcher()));

        replayControls();

        TaskExecutor e = new TaskExecutor();

        e.setErrorLog(errorLog);
        e.setLog(log);
        e.setMessages(getMessages());
        e.setTasks(tasks);

        e.run();

        verifyControls();
    }
View Full Code Here

Examples of org.apache.helix.messaging.handling.TaskExecutor

      if (wrapper == null) {
        wrapper = stateModelFactory.createAndAddBatchMessageWrapper(resourceName);
      }

      // get executor-service for the message
      TaskExecutor executor = (TaskExecutor) context.get(MapKey.TASK_EXECUTOR.toString());
      if (executor == null) {
        logger.error("fail to get executor-service for batch message: " + message.getId()
            + ". msgType: " + message.getMsgType() + ", resource: " + message.getResourceName());
        return null;
      }
View Full Code Here

Examples of org.apache.helix.messaging.handling.TaskExecutor

      if (wrapper == null) {
        wrapper = stateModelFactory.createAndAddBatchMessageWrapper(resourceId);
      }

      // get executor-service for the message
      TaskExecutor executor = (TaskExecutor) context.get(MapKey.TASK_EXECUTOR.toString());
      if (executor == null) {
        LOG.error("fail to get executor-service for batch message: " + message.getId()
            + ". msgType: " + message.getMsgType() + ", resource: " + message.getResourceId());
        return null;
      }
View Full Code Here

Examples of org.apache.helix.messaging.handling.TaskExecutor

      if (wrapper == null) {
        wrapper = stateModelFactory.createAndAddBatchMessageWrapper(resourceId.stringify());
      }

      // get executor-service for the message
      TaskExecutor executor = (TaskExecutor) context.get(MapKey.TASK_EXECUTOR.toString());
      if (executor == null) {
        LOG.error("fail to get executor-service for batch message: " + message.getId()
            + ". msgType: " + message.getMsgType() + ", resource: " + message.getResourceId());
        return null;
      }
View Full Code Here

Examples of org.apache.helix.messaging.handling.TaskExecutor

      {
        wrapper = stateModelFactory.createAndAddBatchMessageWrapper(resourceName);
      }
     
      // get executor-service for the message
      TaskExecutor executor = (TaskExecutor) context.get(MapKey.TASK_EXECUTOR.toString());
      if (executor == null)
      {
        logger.error("fail to get executor-service for batch message: " + message.getId()
            + ". msgType: " + message.getMsgType() + ", resource: " + message.getResourceName());
        return null;
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.