Examples of dec()


Examples of com.codahale.metrics.Counter.dec()

        Long finalIncrement = getLongHeader(in, HEADER_COUNTER_INCREMENT, increment);
        Long finalDecrement = getLongHeader(in, HEADER_COUNTER_DECREMENT, decrement);
        if (finalIncrement != null) {
            counter.inc(finalIncrement);
        } else if (finalDecrement != null) {
            counter.dec(finalDecrement);
        } else {
            counter.inc();
        }
    }
}
View Full Code Here

Examples of com.codahale.metrics.Counter.dec()

        try {
            return invocation.proceed();
        } finally {
            if (counted.active()) {
                counter.dec();
            }
        }
    }

}
View Full Code Here

Examples of org.apache.bookkeeper.client.SyncCounter.dec()

    counter.setLh(lh);

    LOG.debug("Open complete: " + rc);

    counter.setrc(rc);
    counter.dec();
  }

  /**
   * Synchronous open ledger call
   *
 
View Full Code Here

Examples of org.apache.bookkeeper.client.SyncCounter.dec()

   */
  public void createComplete(int rc, LedgerHandle lh, Object ctx) {
    SyncCounter counter = (SyncCounter) ctx;
    counter.setLh(lh);
    counter.setrc(rc);
    counter.dec();
  }

  /**
   * Creates a new ledger. Default of 3 servers, and quorum of 2 servers.
   *
 
View Full Code Here

Examples of org.apache.bookkeeper.client.SyncCounter.dec()

   */
  public void createComplete(int rc, LedgerHandle lh, Object ctx) {
    SyncCounter counter = (SyncCounter) ctx;
    counter.setLh(lh);
    counter.setrc(rc);
    counter.dec();
  }

  /**
   * Creates a new ledger. Default of 3 servers, and quorum of 2 servers.
   *
 
View Full Code Here

Examples of org.apache.bookkeeper.client.SyncCounter.dec()

    counter.setLh(lh);

    LOG.debug("Open complete: " + rc);

    counter.setrc(rc);
    counter.dec();
  }

  /**
   * Synchronous open ledger call
   *
 
View Full Code Here

Examples of org.apache.felix.ipojo.handler.temporal.ServiceUsage.Usage.dec()

     */
    public void onFinally(Object pojo, Member method) {
        if (m_usage != null) {
            Usage usage = (Usage) m_usage.get();
            if (usage.m_stack > 0) {
                if (usage.dec()) {
                    // Exit the method flow => Release all objects
                    usage.clear();
                    m_usage.set(usage); // Set the Thread local as value has been modified
                }
            }
View Full Code Here

Examples of org.apache.felix.ipojo.handler.temporal.ServiceUsage.Usage.dec()

     */
    public void onFinally(Object pojo, Method method) {
        if (m_usage != null) {
            Usage usage = (Usage) m_usage.get();
            if (usage.m_stack > 0) {
                if (usage.dec()) {
                    // Exit the method flow => Release all objects
                    usage.clear();
                    m_usage.set(usage); // Set the Thread local as value has been modified
                }
            }
View Full Code Here

Examples of org.apache.felix.ipojo.handler.temporal.ServiceUsage.Usage.dec()

     */
    public void onFinally(Object pojo, Method method) {
        if (m_usage != null) {
            Usage usage = (Usage) m_usage.get();
            if (usage.m_stack > 0) {
                if (usage.dec()) {
                    // Exit the method flow => Release all objects
                    usage.clear();
                    m_usage.set(usage); // Set the Thread local as value has been modified
                }
            }
View Full Code Here

Examples of org.apache.felix.ipojo.handlers.dependency.ServiceUsage.Usage.dec()

    public void onFinally(Object pojo, Member method) {
        if (m_usage != null) {
            Usage usage = m_usage.get();
            usage.decComponentStack();
            if (usage.m_stack > 0) {
                if (usage.dec()) {
                    // Exit the method flow => Release all objects
                    usage.clear();
                    // Also remove the thread local object.
                    m_usage.remove();
                }
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.