org.jboss.messaging.util
Class TokenBucketLimiter

java.lang.Object
  extended by org.jboss.messaging.util.TokenBucketLimiter

public class TokenBucketLimiter
extends java.lang.Object

A TokenBucketLimiter This class can throttle to a specfic rate, using an algorithm based on the Token Bucket metaphor http://en.wikipedia.org/wiki/Token_bucket The rate is specified in Hertz

Author:
Tim Fox

Constructor Summary
TokenBucketLimiter(int rate, boolean spin)
           
 
Method Summary
 void limit()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TokenBucketLimiter

public TokenBucketLimiter(int rate,
                          boolean spin)
Method Detail

limit

public void limit()


Copyright © 2006 JBoss Inc. All Rights Reserved.