Examples of waitFor()


Examples of org.jgroups.util.Responses.waitFor()

            // Sept 2008 (bela): break if we got a belated JoinRsp (https://jira.jboss.org/jira/browse/JGRP-687)
            if(installViewIfValidJoinRsp(join_promise, false))
                return;

            responses.waitFor(gms.join_timeout);
            responses.done();
            long diff=System.currentTimeMillis() - start;
            if(responses.isEmpty()) {
                log.trace("%s: no members discovered after %d ms: creating cluster as first member", gms.local_addr, diff);
                becomeSingletonMember(mbr);
View Full Code Here

Examples of org.kapott.hbci.manager.FlickerRenderer.waitFor()

      }
    };
   
    renderer.setFrequency(FlickerRenderer.FREQUENCY_MAX);
    renderer.start();
    renderer.waitFor();
   
    // Die erwarteten Daten. Das sind genau 2 Durchlaeufe. (Das Leerzeichen am Ende ist wichtig)
    StringBuffer expected = new StringBuffer();
    expected.append("11111 01111 10000 00000 11111 01111 11111 01111 11011 01011 10000 00000 11010 01010 10001 00001 11000 01000 10000 00000 10000 00000 10100 00100 11010 01010 10010 00010 10000 00000 10100 00100 11001 01001 11000 01000 10001 00001 11001 01001 10010 00010 10000 00000 10100 00100 11000 01000 10010 00010 11100 01100 10110 00110 11010 01010 10001 00001 11110 01110 11010 01010 11010 01010 ");
    expected.append("11111 01111 10000 00000 11111 01111 11111 01111 11011 01011 10000 00000 11010 01010 10001 00001 11000 01000 10000 00000 10000 00000 10100 00100 11010 01010 10010 00010 10000 00000 10100 00100 11001 01001 11000 01000 10001 00001 11001 01001 10010 00010 10000 00000 10100 00100 11000 01000 10010 00010 11100 01100 10110 00110 11010 01010 10001 00001 11110 01110 11010 01010 11010 01010 ");
View Full Code Here

Examples of org.linkedin.util.concurrent.ExternalCommand.waitFor()

      ExternalCommand.create("jar", "-" + (update ? "u" : "c") "vfM",
                             jarFile.getCanonicalPath(),
                             ".");
    cmd.setWorkingDirectory(root);
    cmd.start();
    cmd.waitFor();

    assertEquals(0, cmd.exitValue());

    jarFile.deleteOnExit();
    return jarFile.getCanonicalFile();
View Full Code Here

Examples of org.ogce.gfac.provider.utils.JobSubmissionListener.waitFor()

      context.getNotificationService().info("JobID=" + gramJobid);
      log.info(buf.toString());
      // Send Audit Notifications
      notifier.appAudit(invocationContext.getServiceName(), new URI(job.getIDAsString()), contact, null, null, gssCred.getName().toString(), null, job.getRSL());

      listener.waitFor();
      job.removeListener(listener);

      int jobStatus = listener.getStatus();
      if (jobStatus == GramJob.STATUS_FAILED) {
        errCode = listener.getError();
View Full Code Here

Examples of org.openspaces.admin.pu.ProcessingUnit.waitFor()

        return clusterInfo.getName().substring(0, index);
    }

    private static ProcessingUnitInstance[] waitForInstances(final String applicationName, final String serviceName, final int minimumNumberOfInstances, final long timeout, final TimeUnit timeunit) {
        final ProcessingUnit pu = waitForProcessingUnit(applicationName, serviceName, timeout, timeunit);
        pu.waitFor(minimumNumberOfInstances, timeout, timeunit);
        final ProcessingUnitInstance[] instances = pu.getInstances();
        if (instances.length < minimumNumberOfInstances) {
            throw new IllegalStateException("Could not discover " + minimumNumberOfInstances + " "+ serviceName + " instances in application " + applicationName);
        }
        return instances;
View Full Code Here

Examples of org.rzo.yajsw.controller.jvm.JVMController.waitFor()

    // controller.setDebug(true);
    controller.start();
    controller.processStarted();
    setState(STATE_RUNNING);

    boolean result = controller.waitFor(_config.getInt("wrapper.ping.timeout", DEFAULT_PING_TIMEOUT) * 1000);
    if (result)
    {
      // wait for stream to be available
      for (int i = 0; i < 5 && _osProcess.getInputStream() == null; i++)
        try
View Full Code Here

Examples of org.rzo.yajsw.os.Process.waitFor()

    {
      Process p = OperatingSystem.instance().processManagerInstance().createProcess();
      p.setCommand(getScript() + " " + id + " " + state + " " + count + " " + pid + " " + exitCode);
      p.setPipeStreams(false, false);
      p.start();
      p.waitFor(getTimeout());
      if (p.isRunning())
        p.kill(999);
      if (p.getExitCode() != 0)
        System.out.println("script " + getScript() + "returned " + p.getExitCode());
      p.destroy();
View Full Code Here

Examples of org.tanukisoftware.wrapper.WrapperProcess.waitFor()

                       
                        // Wait for the stdout and stderr reader threads to complete before we say the process completed to avoid confusion.
                        outRunner.join();
                        errRunner.join();
                       
                        System.out.println( Main.getRes().getString( "Child with PID={0} terminated with exitCode={1} : {2} ", new Integer( wProcess.getPID() ), new Integer( wProcess.waitFor() ), m_childCommand ) );
                    }
                    catch ( Throwable t )
                    {
                        t.printStackTrace();
                    }
View Full Code Here

Examples of org.tanukisoftware.wrapper.WrapperProcess.waitFor()

                try
                {
                    WrapperProcess proc = WrapperManager.exec( "../test/simplewaiter 65 1" );
                    proc.getOutputStream().close();
                    System.out.println( Main.getRes().getString( "{0} small child process {1} is alive {2}"new Object[]{ new Integer( i ), new Integer( proc.getPID() ) , new Boolean( proc.isAlive() ) } ) );
                    System.out.println( Main.getRes().getString( "{0} child process (PID= {1}) finished with code {2}", new Object[]{ new Integer( i ), new Integer ( proc.getPID() ), new Integer( proc.waitFor() ) } ) );
                }
                catch ( InterruptedException e )
                {
                    // TODO Auto-generated catch block
                    e.printStackTrace();
View Full Code Here

Examples of org.tanukisoftware.wrapper.WrapperProcess.waitFor()

                        System.out.println( i + Main.getRes().getString" dir failed. most likely we are not on Windows, try ls -l before giving up." ) );
                        proc = WrapperManager.exec( "ls -l", wpm );
                    }

                    System.out.println( i + " PID = " + proc.getPID() );
                    System.out.println( i + Main.getRes().getString( " child process (PID= {0}) finished with code " , new Integer( proc.getPID() ) ) +  proc.waitFor() );

                    System.out.println( i + Main.getRes().getString( " now read the output" ) );
                    BufferedReader br = new BufferedReader( new InputStreamReader( proc.getInputStream() ) );
                    try
                    {
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.