Package java.util.concurrent.atomic

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


        try {
            long start = System.currentTimeMillis();
            while (!done.get() && !renderJob.cancel() && start + 2000 < System.currentTimeMillis())
                synchronized (done) {
                    try {
                        done.wait(200);
                    } catch (InterruptedException e) {
                        throw (RuntimeException) new RuntimeException().initCause(e);
                    }
                }
            if (!done.get() && !renderJob.cancel()) {
View Full Code Here


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

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

            out.write(data);
        }
        out.flush();
        synchronized (complete) {
            if (!complete.get()) {
                complete.wait(30000);
            }
        }
        assertTrue(complete.get());
    }
   
View Full Code Here

          waiter.notifyAll();
        }
      }}, null);
    synchronized (waiter) {
      while (!waiter.get())
        waiter.wait();
    }
    Code code = Code.get(rc.get());
    if (code != KeeperException.Code.OK) {
      throw KeeperException.create(code);
    }
View Full Code Here

    // wait for t1 to finish setting fields
    synchronized (t1Done) {
      while (!t1Done.get()) {
        try {
          t1Done.wait();
        } catch (InterruptedException e) {
        }
      }
    }
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

              synchronized(start)
              {
                while(!start.get())
                  try
                  {
                    start.wait();
                  }
                  catch (InterruptedException e)
                  {
                    Thread.currentThread().interrupt();
                  }
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(1000);
        } catch (InterruptedException e) {
          e.printStackTrace();
        }
      }
    }
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.