Package java.util.concurrent.atomic

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


        Group map2 = new Group(connection2,"map2");
        map2.start();
        map2.put("test","foo");
        synchronized(called) {
            if (!called.get()) {
               called.wait(5000);
            }
        }
        assertTrue(called.get());
        assertTrue(map1.get("test").equals("foo"));
        map1.stop();
View Full Code Here


        Group map2 = new Group(connection2,"map2");
        map2.start();
        map2.put("test","foo");
        synchronized(called) {
            if (!called.get()) {
               called.wait(5000);
            }
        }
        assertTrue(called.get());
        called.set(false);
        assertTrue(map1.isEmpty()==false);
View Full Code Here

        called.set(false);
        assertTrue(map1.isEmpty()==false);
        map2.remove("test");
        synchronized(called) {
            if (!called.get()) {
               called.wait(5000);
            }
        }
        assertTrue(map1.isEmpty());
       
        map1.stop();
View Full Code Here

               called1.wait(5000);
            }
        }
        synchronized(called2) {
            if (!called2.get()) {
               called2.wait(5000);
            }
        }
        assertTrue(called1.get());
        assertTrue(called2.get());
        map1.stop();
View Full Code Here

           });  

           out.println("kill -STOP " + pid);          
          
           synchronized(lock){
               lock.wait(2500);
           }
           out.close();
           reader.close();
           assertTrue("Client did not terminate the connection, check log for details",lock.get());
       }
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

    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

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

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.