Package org.hornetq.utils

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


         Assert.assertEquals(i, latch.getCount());
         latch.countDown();
         Assert.assertEquals(i - 1, latch.getCount());
      }

      latch.await();
   }

   /**
    *
    * This test will open numberOfThreads threads, and add numberOfAdds on the
View Full Code Here


         @Override
         public void run()
         {
            try
            {
               if (!latch.await(5000))
               {
                  ReusableLatchTest.log.error("Latch timed out");
               }
            }
            catch (Exception e)
View Full Code Here

         {
            waiting = true;
            readyLatch.countDown();
            try
            {
               if (!latch.await(1000))
               {
                  ReusableLatchTest.log.error("Latch timed out!", new Exception("trace"));
               }
            }
            catch (Exception e)
View Full Code Here

      Assert.assertEquals(false, t.waiting);

      Assert.assertNull(t.e);

      Assert.assertTrue(latch.await(1000));

      Assert.assertEquals(0, latch.getCount());

      latch.countDown();
View Full Code Here

         {
            reusableLatchDone.countDown();
            System.out.println("Waiting on Compact");
            try
            {
               reusableLatchWait.await();
            }
            catch (InterruptedException e)
            {
               e.printStackTrace();
            }
View Full Code Here

         {
            reusableLatchDone.countDown();
            System.out.println("Waiting on Compact");
            try
            {
               reusableLatchWait.await();
            }
            catch (InterruptedException e)
            {
               e.printStackTrace();
            }
View Full Code Here

         {
            reusableLatchDone.countDown();
            System.out.println("Waiting on Compact");
            try
            {
               reusableLatchWait.await();
            }
            catch (InterruptedException e)
            {
               e.printStackTrace();
            }
View Full Code Here

   {
      ReusableLatch latch = new ReusableLatch(1000);
     
      latch.countDown(5000);
     
      assertTrue(latch.await(1000));
     
     
      assertEquals(0, latch.getCount());
   }
  
View Full Code Here

         Assert.assertEquals(i, latch.getCount());
         latch.countDown();
         Assert.assertEquals(i - 1, latch.getCount());
      }

      latch.await();
   }

   /**
    *
    * This test will open numberOfThreads threads, and add numberOfAdds on the
View Full Code Here

         @Override
         public void run()
         {
            try
            {
               if (!latch.await(5000))
               {
                  ReusableLatchTest.log.error("Latch timed out");
               }
            }
            catch (Exception e)
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.