Examples of Executor


Examples of com.sun.enterprise.ee.admin.concurrent.Executor

                    for (int ii = 0; ii < servers.length; ii++) {
                        tasks[ii] = new StartServerTask(
                                  servers[ii].getName(), syncInstancesOverride,
                                  monitorInterval, restartIntancesOverride, timeout);
                    }
                    Executor e = new Executor(tasks);
                    e.run();
                }
            } else {
                // since the instances are not started now, need to retain the restart flag
                ProcessManager.setRestartInstance(restartIntancesOverride);
            }
View Full Code Here

Examples of com.sun.jini.thread.Executor

      }
  };
  if (state == UNUSED) {
      action.run();
  } else {
      Executor systemThreadPool =
    (Executor) AccessController.doPrivileged(
        (login == null) ?
        (PrivilegedAction) new GetThreadPoolAction(false) :
        new PrivilegedAction() {
      public Object run() {
          return Subject.doAsPrivileged(
                login.getSubject(),
                new GetThreadPoolAction(false),
                null);
      }
    });
      systemThreadPool.execute(action, "UnexportGroup");
  }
    }
View Full Code Here

Examples of com.tek42.perforce.process.Executor

   * Returns the output created by "p4 info"
   *
   * @return The string output of p4 info
   */
  public String info() throws Exception {
    Executor p4 = getExecFactory().newExecutor();
    String cmd[] = { getExecutable(), "info" };
    p4.exec(cmd);
    StringBuilder sb = new StringBuilder();
    String line;
    while((line = p4.getReader().readLine()) != null) {
      sb.append(line + "\n");
    }
    return sb.toString();
  }
View Full Code Here

Examples of com.volantis.synergetics.testtools.Executor

                    // is here currently.
                    servletContext.setRealPath(
                            configFileBuilder.getConfigFileDir());
                    servletContext.setMCSConfigFile("/tmp/mcs-config.xml");
                    // Collect System.err output
                    consoleOutput.useCollectionWith(new Executor() {
                        public void execute() throws Exception {
                            synchronized(servletContext) {
                                ConfigContext cc = new ServletConfigContext(servletContext);

                                ServletExternalPathToInternalURLMapper mapper =
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.concurrent.Executor

   * TaskExecutor interface, delegating to the ThreadPoolExecutor instance.
   * @see edu.emory.mathcs.backport.java.util.concurrent.Executor#execute(Runnable)
   * @see org.springframework.core.task.TaskExecutor#execute(Runnable)
   */
  public void execute(Runnable task) {
    Executor executor = getThreadPoolExecutor();
    try {
      executor.execute(task);
    }
    catch (RejectedExecutionException ex) {
      throw new TaskRejectedException("Executor [" + executor + "] did not accept task: " + task, ex);
    }
  }
View Full Code Here

Examples of freenet.support.Executor

        DummyRandomSource random = new DummyRandomSource(3142);
        DummyRandomSource topologyRandom = new DummyRandomSource(3143);
        //DiffieHellman.init(random);
        Node[] nodes = new Node[NUMBER_OF_NODES];
        Logger.normal(RealNodeRoutingTest.class, "Creating nodes...");
        Executor executor = new PooledExecutor();
        for(int i=0;i<NUMBER_OF_NODES;i++) {
            nodes[i] =
              NodeStarter.createTestNode(DARKNET_PORT_BASE+i, 0, name, DISABLE_PROBABILISTIC_HTLS, MAX_HTL, 20 /* 5% */, random, executor, 500*NUMBER_OF_NODES, 256*1024, true, ENABLE_SWAPPING, false, ENABLE_ULPRS, ENABLE_PER_NODE_FAILURE_TABLES, ENABLE_SWAP_QUEUEING, ENABLE_PACKET_COALESCING, BWLIMIT, ENABLE_FOAF, false, true, USE_SLASHDOT_CACHE, null);
            Logger.normal(RealNodeRoutingTest.class, "Created node "+i);
        }
View Full Code Here

Examples of gov.nasa.arc.mct.evaluator.api.Executor

 
  @SuppressWarnings("unchecked")
  @Test(dataProvider="evalTestData")
  public void testEvalutor(String code, String inputValue, String expectedValue) {
    EnumEvaluator enumEvaluator = new EnumEvaluator();
    Executor e = enumEvaluator.compile(code);
    FeedProvider fp = Mockito.mock(FeedProvider.class);
    Mockito.when(fp.getSubscriptionId()).thenReturn("abc");
    FeedProvider.RenderingInfo data = new FeedProvider.RenderingInfo(inputValue, Color.red, "x", Color.red, true);
    Mockito.when(fp.getRenderingInfo(Mockito.anyMap())).thenReturn(data);
    Map<String, String> value = Collections.singletonMap(FeedProvider.NORMALIZED_RENDERING_INFO, data.toString());
    List<Map<String, String>> values = Collections.singletonList(value);
    Map<String, List<Map<String, String>>> dataSet = Collections.singletonMap(fp.getSubscriptionId(), values);
    FeedProvider.RenderingInfo info = e.evaluate(dataSet, Collections.singletonList(fp));
    Assert.assertTrue(info.isValid());
    Assert.assertEquals(info.getValueText(), expectedValue);
  }
View Full Code Here

Examples of hudson.model.Executor

        when(t.getEstimatedDuration()).thenReturn(10000L);
        when(t.getSubTasks()).thenReturn((Collection) asList(t));


        Computer c = createMockComputer(2);
        Executor e = c.getExecutors().get(0);

        when(e.isIdle()).thenReturn(false);
        when(e.getEstimatedRemainingTimeMillis()).thenReturn(300L);

        JobOffer o = createMockOffer(c.getExecutors().get(1));

        MappingWorksheet mw = new MappingWorksheet(wrap(t), asList(o));
View Full Code Here

Examples of io.crate.executor.Executor

            executePlan(plan, outputNames, listener, request);
        }
    }

    private void executePlan(final Plan plan, final String[] outputNames, final ActionListener<TResponse> listener, final TRequest request) {
        Executor executor = executorProvider.get();
        Job job = executor.newJob(plan);
        final UUID jobId = job.id();
        if (jobId != null) {
            statsTables.jobStarted(jobId, request.stmt());
        }
        List<ListenableFuture<TaskResult>> resultFutureList = executor.execute(job);
        Futures.addCallback(Futures.allAsList(resultFutureList), new FutureCallback<List<TaskResult>>() {
            @Override
            public void onSuccess(@Nullable List<TaskResult> result) {
                TResponse response;
View Full Code Here

Examples of java.util.concurrent.Executor

                if(loopback) {
                    if(log.isTraceEnabled()) log.trace(new StringBuilder("looping back message ").append(msg));
                    if(msg.getSrc() == null)
                        msg.setSrc(local_addr);

                    Executor pool=msg.isFlagSet(Message.OOB)? oob_pool : default_pool;
                    pool.execute(new Runnable() {
                        public void run() {
                            up_prot.up(evt);
                        }
                    });
                }
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.