Examples of countUp()


Examples of org.apache.tomcat.util.threads.CounterLatch.countUp()

        if (latch!=null) latch.await();
    }
   
    protected long countUpConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) return latch.countUp();
        else return -1;
    }
   
    protected long countDownConnection() {
        CounterLatch latch = connectionCounterLatch;
View Full Code Here

Examples of org.apache.tomcat.util.threads.CounterLatch.countUp()

        if (latch!=null) latch.await();
    }
   
    protected long countUpConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) return latch.countUp();
        else return -1;
    }
   
    protected long countDownConnection() {
        CounterLatch latch = connectionCounterLatch;
View Full Code Here

Examples of org.apache.tomcat.util.threads.CounterLatch.countUp()

        if (latch!=null) latch.await();
    }
   
    protected long countUpConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) return latch.countUp();
        else return -1;
    }
   
    protected long countDownConnection() {
        CounterLatch latch = connectionCounterLatch;
View Full Code Here

Examples of org.apache.tomcat.util.threads.CounterLatch.countUp()

        if (latch!=null) latch.await();
    }
   
    protected long countUpConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) return latch.countUp();
        else return -1;
    }
   
    protected long countDownConnection() {
        CounterLatch latch = connectionCounterLatch;
View Full Code Here

Examples of org.apache.tomcat.util.threads.CounterLatch.countUp()

        if (latch!=null) latch.await();
    }
   
    protected long countUpConnection() {
        CounterLatch latch = connectionCounterLatch;
        if (latch!=null) return latch.countUp();
        else return -1;
    }
   
    protected long countDownConnection() {
        CounterLatch latch = connectionCounterLatch;
View Full Code Here

Examples of org.hornetq.utils.ReusableLatch.countUp()

   {
      ReusableLatch latch = new ReusableLatch();

      for (int i = 1; i <= 100; i++)
      {
         latch.countUp();
         Assert.assertEquals(i, latch.getCount());
      }

      for (int i = 100; i > 0; i--)
      {
View Full Code Here

Examples of org.hornetq.utils.ReusableLatch.countUp()

    */
   public void testLatchOnMultiThread() throws Exception
   {
      final ReusableLatch latch = new ReusableLatch();

      latch.countUp(); // We hold at least one, so ThreadWaits won't go away

      final int numberOfThreads = 100;
      final int numberOfAdds = 100;

      class ThreadWait extends Thread
View Full Code Here

Examples of org.hornetq.utils.ReusableLatch.countUp()

               // Everybody should start at the same time, to worse concurrency
               // effects
               latchStart.await();
               for (int i = 0; i < numberOfAdds; i++)
               {
                  latch.countUp();
               }
            }
            catch (Exception e)
            {
               ReusableLatchTest.log.error(e.getMessage(), e);
View Full Code Here

Examples of org.hornetq.utils.ReusableLatch.countUp()

      for (int i = 0 ; i < 5; i++)
      {
         latch.countDown();
      }
     
      latch.countUp();

      class ThreadWait extends Thread
      {
         private volatile boolean waiting = false;
View Full Code Here

Examples of org.hornetq.utils.ReusableLatch.countUp()

      Assert.assertEquals(false, t.waiting);

      Assert.assertNull(t.e);

      latch.countUp();

      t = new ThreadWait();
      t.start();

      t.readyLatch.await();
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.