Package java.util.concurrent.atomic

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


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

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


        lastUpdate = now;
        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

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

            out.write(data);
        }
        out.flush();
        synchronized (complete) {
            if (!complete.get()) {
                complete.wait(30000);
            }
        }
        assertTrue(complete.get());
    }
}
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

      public AllocateResponse answer(InvocationOnMock invocation)
          throws Throwable {
        secondHeartbeatSync.incrementAndGet();
        while(heartbeatBlock.get()) {
          synchronized(heartbeatBlock) {
            heartbeatBlock.wait();
          }
        }
        secondHeartbeatSync.incrementAndGet();
        return response2;
      }
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

    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

        lastUpdate = now;
        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

            {
                try
                {
                    synchronized (done)
                    {
                        done.wait(endTime - System.currentTimeMillis());
                    }
                }
                catch (InterruptedException e)
                {
                    // Check the time and if necessary sleep for a bit longer
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.