Package edu.emory.mathcs.backport.java.util.concurrent

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


            public void disconnect_push_consumer()
            {
                super.disconnect_push_consumer();

                disconnectedLatch.countDown();
            }
        };
        _receiver.connect(channel_, false);

        Thread _receiverThread = new Thread(_receiver);
View Full Code Here


           
            public void disconnect_structured_push_consumer()
            {
                super.disconnect_structured_push_consumer();
               
                disconnectedLatch.countDown();
            }
        };

        _sender.connect(channel_, false);
        _receiver.connect(channel_, false);
View Full Code Here

                super.drinking_coffee(name, minutes);
              
                assertEquals("alphonse", name);
                assertEquals(10, minutes);
               
                _hasReceived.countDown();
            }
        };

        _mockCoffee.drinking_coffee_expect = 1;
View Full Code Here

        new Thread()
        {
            public void run()
            {
                _pullCoffee.drinking_coffee(_name, _minutes);
                _latch.countDown();
            }
        }.start();

        objectUnderTest_.getMessageConsumer().queueMessage(_mesg.getHandle());
View Full Code Here

            {
                try
                {
                    synchronized (lock_)
                    {
                        getPutOrder.countDown();
                        objectUnderTest_.getMessageBlocking();
                    }

                    received.set(true);
View Full Code Here

                    assertTrue(_recvTime >= _startTime.getTime());
                   
                    failed.set(false);
                } finally
                {
                    _latch.countDown();
                }
            }
        };

        _taskProcessor.processMessage(_event);
View Full Code Here

          try {
          session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
          MessageProducer producer = session.createProducer(queue);
          producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);
          producer.send(session.createTextMessage(message));
          done.countDown();
        } catch (JMSException e) {
        } finally {
          safeClose(session);
        }
      }
View Full Code Here

                if ( "start".equals( message ) ) {
                    session.write( "open new" );
                } else if ( "re-use c1".equals( message ) ) {
                    session.write( "tell me something on c1 now" );
                } else if ( ( (String) message ).startsWith( "please don't deadlock" ) ) {
                    messageCount.countDown();
                } else {
                    fail( "unexpected message received " + message );
                }
            }
        } );
View Full Code Here

        executor.execute(new Work() {
            public void release() {
                work.release();
            }
            public void run() {
                latch.countDown();
                work.run();
            }
        });
        long t = System.currentTimeMillis();
        try {
View Full Code Here

                super.drinking_coffee(name, minutes);

                assertEquals("alphonse", name);
                assertEquals(10, minutes);

                _hasReceived.countDown();
            }
        };

        _mockCoffee.drinking_coffee_expect = 1;
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.