org.apache.cxf.transport.jms
Class ThrottlingCounter

java.lang.Object
  extended by org.apache.cxf.transport.jms.ThrottlingCounter
All Implemented Interfaces:
Counter

public class ThrottlingCounter
extends Object
implements Counter

Counter that throttles a jms listener on a high and low water mark. When the counter reaches the high watermark the listener will be stopped. When the counter reaches the low watermark the listener will be started.


Constructor Summary
ThrottlingCounter(JMSListenerContainer listenerContainer, int lowWatermark, int highWatermark)
           
 
Method Summary
 int decrementAndGet()
           
 int incrementAndGet()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThrottlingCounter

public ThrottlingCounter(JMSListenerContainer listenerContainer,
                         int lowWatermark,
                         int highWatermark)
Method Detail

incrementAndGet

public final int incrementAndGet()
Specified by:
incrementAndGet in interface Counter

decrementAndGet

public final int decrementAndGet()
Specified by:
decrementAndGet in interface Counter


Apache CXF