Class TokenBucketPool

java.lang.Object
tigase.xmpp.impl.TokenBucketPool
All Implemented Interfaces:
Initializable, UnregisterAware

public class TokenBucketPool extends Object implements Initializable, UnregisterAware
  • Constructor Details

    • TokenBucketPool

      public TokenBucketPool(long rate, long per, TimeUnit timeUnit)
    • TokenBucketPool

      public TokenBucketPool(long rate, long per)
    • TokenBucketPool

      public TokenBucketPool()
  • Method Details

    • setAutoPurgeEnabled

      public void setAutoPurgeEnabled(boolean enabled)
    • getTimeUnit

      public TimeUnit getTimeUnit()
    • setTimeUnit

      public void setTimeUnit(TimeUnit timeUnit)
    • getDefaultRate

      public long getDefaultRate()
    • setDefaultRate

      public void setDefaultRate(long defaultRate)
    • getDefaultPer

      public long getDefaultPer()
    • setDefaultPer

      public void setDefaultPer(long defaultPer)
    • consume

      public boolean consume(String key)
    • purge

      public void purge()
    • beforeUnregister

      public void beforeUnregister()
      Description copied from interface: UnregisterAware
      Method called before bean unregister.
      Specified by:
      beforeUnregister in interface UnregisterAware
    • initialize

      public void initialize()
      Description copied from interface: Initializable
      Method will be called, when bean will be created, configured and ready to use.
      Specified by:
      initialize in interface Initializable