tigase.xmpp.impl

## Class TokenBucketPool

- java.lang.Object
- - tigase.xmpp.impl.TokenBucketPool

- All Implemented Interfaces:
    Initializable, UnregisterAware

      public class TokenBucketPool
      extends Object
      implements Initializable, UnregisterAware

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `TokenBucketPool.TokenBucket` Single TokenBucket.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `TokenBucketPool()`
    `TokenBucketPool(long rate, long per)`
    `TokenBucketPool(long rate, long per, TimeUnit timeUnit)`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `beforeUnregister()` Method called before bean unregister.
    `boolean` | `consume(String key)`
    `long` | `getDefaultPer()`
    `long` | `getDefaultRate()`
    `TimeUnit` | `getTimeUnit()`
    `void` | `initialize()` Method will be called, when bean will be created, configured and ready to use.
    `void` | `purge()`
    `void` | `setAutoPurgeEnabled(boolean enabled)`
    `void` | `setDefaultPer(long defaultPer)`
    `void` | `setDefaultRate(long defaultRate)`
    `void` | `setTimeUnit(TimeUnit timeUnit)`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TokenBucketPool

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

    - #### TokenBucketPool

          public TokenBucketPool(long rate,
                                 long per)

    - #### TokenBucketPool

          public TokenBucketPool()

  - ### Method Detail

    - #### 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`

Copyright © 2004–2020 "Tigase, Inc.". All rights reserved.