Package java.util.concurrent.atomic

Examples of java.util.concurrent.atomic.AtomicBoolean.wait()


        ((InternalAgenda) ksession.getAgenda()).activateRuleFlowGroup("Group1");
       
        synchronized( fired ) {
            if( !fired.get() ) {
                fired.wait();
            }
        }

        assertEquals( 1,
                      list.size() );
View Full Code Here


        ((InternalAgenda) ksession.getAgenda()).activateRuleFlowGroup("Group1");
       
        synchronized( fired ) {
            if( !fired.get() ) {
                fired.wait();
            }
        }

        assertEquals( 1,
                      list.size() );
View Full Code Here

        lastUpdate = now;
        tickleOpening = tickleOpening("post_open_deploy");
      }
      synchronized (signaller) {
        try {
          signaller.wait(period);
        } catch (InterruptedException e) {
          // Go to the loop check.
        }
      }
      now = System.currentTimeMillis();
View Full Code Here

        lastUpdate = now;
        tickleOpening = tickleOpening("post_open_deploy");
      }
      synchronized (signaller) {
        try {
          signaller.wait(period);
        } catch (InterruptedException e) {
          // Go to the loop check.
        }
      }
      now = System.currentTimeMillis();
View Full Code Here

        me.setStatus(ExchangeStatus.DONE);
        channel.send(me);

        if (!done.get()) {
            synchronized (done) {
                done.wait(5000);
            }
        }

        assertTrue("Secondary thread didn't finish", done.get());
        assertTrue("Exception in secondary thread", success.get());
View Full Code Here

    executor.registerListener(EventType.C_M_MODIFY_TABLE, new DoneListener(done));
    this.admin.modifyTable(tableName, htd);
    while (!done.get()) {
      synchronized (done) {
        try {
          done.wait(100);
        } catch (InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
View Full Code Here

          tickleOpening = tickleOpening("post_open_deploy");
        }
      }
      synchronized (signaller) {
        try {
          if (!signaller.get()) signaller.wait(period);
        } catch (InterruptedException e) {
          // Go to the loop check.
        }
      }
      now = System.currentTimeMillis();
View Full Code Here

        execSqlUpdate("INSERT INTO TEST(TYPE, DATA, ACK, RESULT) VALUES (1, '" + DEFAULT_MESSAGE
                      + "', NULL, NULL)");

        synchronized (called)
        {
            called.wait(20000);
        }
        assertTrue(called.get());

        Thread.sleep(1000);
View Full Code Here

    t.start();

    // We need to wait for a second to make sure the server thread starts.
    synchronized (readyToAccept) {
      if (!readyToAccept.get()) {
        readyToAccept.wait(4000);
      }
    }
    assertTrue("Not ready to accept?", readyToAccept.get());
    Thread.yield();
    Thread.yield();
View Full Code Here

    t.setDaemon(true);
    t.start();

    synchronized (readyToAccept) {
      if (!readyToAccept.get()) {
        readyToAccept.wait(4000);
      }
    }
    assertTrue("Not ready to accept?", readyToAccept.get());
    Thread.yield();
    Thread.yield();
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.