Examples of countUp()


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

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

{
   public void testTimeout() throws Exception
   {
      ReusableLatch latch = new ReusableLatch();

      latch.countUp();

      long start = System.currentTimeMillis();
      Assert.assertFalse(latch.await(1000));
      long end = System.currentTimeMillis();
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

Examples of org.tamacat.httpd.jmx.BasicCounter.countUp()

 
  @Override
  public void doFilter(HttpRequest request, HttpResponse response,
      HttpContext context) {
    BasicCounter counter = urlCounter.getCounter(getPath(serviceUrl));
    if (counter != null) counter.countUp();
  }

  @Override
  public void init(ServiceUrl serviceUrl) {
    this.serviceUrl = serviceUrl;
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.