Examples of countDown()


Examples of com.google.code.hs4j.Command.countDown()

   */
  public void destroy() {
    Command command = this.currentCommand.get();
    if (command != null) {
      command.setExceptionMessage("Connection has been closed");
      command.countDown();
    }
    while ((command = this.commandAlreadySent.poll()) != null) {
      command.setExceptionMessage("Connection has been closed");
      command.countDown();
    }
View Full Code Here

Examples of com.hazelcast.concurrent.countdownlatch.CountDownLatchService.countDown()

    }

    @Override
    public void run() throws Exception {
        CountDownLatchService service = getService();
        service.countDown(name);
        int count = service.getCount(name);
        shouldNotify = count == 0;
    }

    @Override
View Full Code Here

Examples of com.hazelcast.core.ICountDownLatch.countDown()

                        sleep(100);
                    } catch (InterruptedException e) {
                        e.printStackTrace();
                    }
                    final ICountDownLatch l = instances[i].getCountDownLatch("test");
                    l.countDown();
                    assertEquals(k - 1 - i, l.getCount());
                }
            }
        }.start();
View Full Code Here

Examples of com.volantis.shared.time.Countdown.countdown()

            // If the state requires it then wait until the state changes.
            if (state.mustWait()) {
                Countdown countdown = Countdown.getCountdown(timeout, clock);
                do {
                    try {
                        Period remaining = countdown.countdown();
                        entry.wait(remaining.inMillisTreatIndefinitelyAsZero());
                        state = entry.getState();
                    } catch (InterruptedException e) {
                        throw new ExtendedRuntimeException(e);
                    } catch (TimedOutException e) {
View Full Code Here

Examples of edu.emory.mathcs.backport.java.util.concurrent.CountDownLatch.countDown()

        container.addComponent("activemq", jmsComponentClientAcknowledge(connectionFactory));
        PojoComponent component = new PojoComponent();
        component.addService("listener", new MessageListener(){
      public void onMessage(Message msg) {
        System.out.println("Received: "+msg);
        receivedCountDown.countDown();       
      }
    });
        container.addComponent("default", component);

        // lets add a jms -> pojo route
View Full Code Here

Examples of java.util.concurrent.CountDownLatch.countDown()

            adders[i]=new Adder(unicast, latch, counter, seqno, oob, local_addr, sender);
            adders[i].start();
        }

        long start=System.currentTimeMillis();
        latch.countDown(); // starts all adders

        lock.lock();
        try {
            while(delivered_msgs.get() < num_msgs) {
                try {
View Full Code Here

Examples of java.util.concurrent.CountDownLatch.countDown()

            adders[i]=new Sender(unicast, latch, counter, seqno, oob, local_addr, sender);
            adders[i].start();
        }

        long start=System.currentTimeMillis();
        latch.countDown(); // starts all adders

        lock.lock();
        try {
            while(delivered_msgs.get() < num_msgs) {
                try {
View Full Code Here

Examples of java.util.concurrent.CountDownLatch.countDown()

            adders[i]=new Sender(nak, latch, counter, seqno, oob, sender);
            adders[i].start();
        }

        long start=System.currentTimeMillis();
        latch.countDown(); // starts all adders

        lock.lock();
        try {
            while(delivered_msgs.get() < num_msgs) {
                try {
View Full Code Here

Examples of java.util.concurrent.CountDownLatch.countDown()

            adders[i]=new Adder(1, NUM, 10, win, latch);
        }
        for(Adder adder: adders)
            adder.start();

        latch.countDown();

        for(Adder adder: adders)
            adder.join();

        System.out.println("win = " + win);
View Full Code Here

Examples of java.util.concurrent.CountDownLatch.countDown()

        for(int i=0; i < removers.length; i++) {
            removers[i]=new Remover(win, latch, count);
            removers[i].start();
        }

        latch.countDown();

        for(Adder adder: adders)
            adder.join();

        int total=0;
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.