Examples of decrement()


Examples of org.apache.servicemix.nmr.management.stats.CountStatistic.decrement()

        assertEquals(1, stat.getCount());

        stat.increment();
        assertEquals(2, stat.getCount());

        stat.decrement();
        assertEquals(1, stat.getCount());

        Thread.sleep(500);

        stat.increment();
View Full Code Here

Examples of org.apache.wicket.util.value.Count.decrement()

        {
          @Override
          public void undo()
          {
            // revert
            count2.decrement();
          }
        });
      }
    };
    add(linkWithStateChange);
View Full Code Here

Examples of org.hornetq.core.paging.PageTransactionInfo.decrement()

         // Update information about transactions
         // This needs to be done after routing because of duplication detection
         if (pageUserTransaction != null && message.isDurable())
         {
            pageUserTransaction.decrement();
            pageTransactionsToUpdate.add(pageUserTransaction);
         }
      }

      if (!running)
View Full Code Here

Examples of org.jboss.as.quickstarts.ejb.remote.stateful.RemoteCounter.decrement()

        }
        // now decrementing
        System.out.println("Counter will now be decremented " + NUM_TIMES + " times");
        for (int i = NUM_TIMES; i > 0; i--) {
            System.out.println("Decrementing counter");
            statefulRemoteCounter.decrement();
            System.out.println("Count after decrement is " + statefulRemoteCounter.getCount());
        }
    }

    /**
 
View Full Code Here

Examples of org.jboss.as.test.clustering.cluster.ejb3.stateful.remote.failover.RemoteCounter.decrement()

            // repeat invocations
            final int countBeforeDecrementing = resultAfterShuttingDownANode.getCount();
            final String aliveNode = resultAfterShuttingDownANode.getNodeName();
            for (int i = NUM_TIMES; i > 0; i--) {
                resultAfterShuttingDownANode = remoteCounter.decrement();
                Assert.assertNotNull("Result from remote stateful counter, after shutting down a node was null", resultAfterShuttingDownANode);
                Assert.assertEquals("Result was received from an unexpected node, after shutting down a node", aliveNode, resultAfterShuttingDownANode.getNodeName());
                logger.info("Counter decremented to " + resultAfterShuttingDownANode.getCount() + " on node " + resultAfterShuttingDownANode.getNodeName());
            }
            final CounterResult finalResult = remoteCounter.getCount();
View Full Code Here

Examples of org.jboss.messaging.core.impl.DeliveringCounter.decrement()

         counter.increment(m);
         mids[i] = m;
      }
      assertEquals(0, counter.get());
      for (int i = 0; i < 49; i++) {
         counter.decrement(mids[i]);
      }
      assertEquals(0, counter.get());
      counter.reset();
      assertEquals(0, counter.get());
   }
View Full Code Here

Examples of org.jboss.test.ejb3.war.deployment.Counter.decrement()

      // increment one more time
      count = counter.increment();
      assertEquals("Unexpected count after second increment", 2, count);

      // now decrement
      count = counter.decrement();
      assertEquals("Unexpected count after decrement", 1, count);

      // decrement one more time
      count = counter.decrement();
      assertEquals("Unexpected count after second decrement", 0, count);
View Full Code Here

Examples of org.jboss.test.ejb3.war.deployment.Counter.decrement()

      // now decrement
      count = counter.decrement();
      assertEquals("Unexpected count after decrement", 1, count);

      // decrement one more time
      count = counter.decrement();
      assertEquals("Unexpected count after second decrement", 0, count);

   }

}
View Full Code Here

Examples of org.jquantlib.util.Date.decrement()

                    return adjust(d, BusinessDayConvention.PRECEDING);
                }
            }
        } else if (c == BusinessDayConvention.PRECEDING || c == BusinessDayConvention.MODIFIED_PRECEDING) {
            while (isHoliday(d1))
                d1.decrement();
            if (c == BusinessDayConvention.MODIFIED_PRECEDING && d1.getMonth() != d.getMonth()) {
                return adjust(d, BusinessDayConvention.FOLLOWING);
            }
        } else {
            throw new IllegalArgumentException("unknown business-day convention");
View Full Code Here

Examples of org.jquantlib.util.Date.decrement()

                        d1.increment();
                    n--;
                }
            } else {
                while (n < 0) {
                    d1.decrement();
                    while (isHoliday(d1))
                        d1.decrement();
                    n++;
                }
            }
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.