OSMQ
v2.0.1

osmq.util
Class RateRegulator

java.lang.Object
  extended byosmq.util.RateRegulator
All Implemented Interfaces:
EventCounter

public class RateRegulator
extends java.lang.Object
implements EventCounter


Constructor Summary
RateRegulator()
           
RateRegulator(int eventsPerSecond)
           
 
Method Summary
 int getAvgRate()
           
 long getEventCount()
           
 int getThrottleRate()
           
 void nextEvent()
           
 void reset()
           
 void setThrottleRate(int eventsPerSecond)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RateRegulator

public RateRegulator()

RateRegulator

public RateRegulator(int eventsPerSecond)
Method Detail

nextEvent

public final void nextEvent()

setThrottleRate

public final void setThrottleRate(int eventsPerSecond)

getThrottleRate

public final int getThrottleRate()

reset

public final void reset()

getEventCount

public final long getEventCount()
Specified by:
getEventCount in interface EventCounter

getAvgRate

public final int getAvgRate()

(c) 2000 - 2003 MQue Systems
All Rights Reserved