Class TokenBucketPool

    • Constructor Detail

      • TokenBucketPool

        public TokenBucketPool​(long rate,
                               long per,
                               java.util.concurrent.TimeUnit timeUnit)
      • TokenBucketPool

        public TokenBucketPool​(long rate,
                               long per)
      • TokenBucketPool

        public TokenBucketPool()
    • Method Detail

      • setAutoPurgeEnabled

        public void setAutoPurgeEnabled​(boolean enabled)
      • getTimeUnit

        public java.util.concurrent.TimeUnit getTimeUnit()
      • setTimeUnit

        public void setTimeUnit​(java.util.concurrent.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​(java.lang.String key)
      • purge

        public void purge()
      • 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