Class PublishRateLimiterDisable

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void checkPublishRate()
      checks and update state of current publish and marks if it has exceeded the rate-limiting threshold.
      void close()
      Close the limiter.
      void incrementPublishCount​(int numOfMessages, long msgSizeInBytes)
      increments current publish count.
      boolean isPublishRateExceeded()
      returns true if current publish has reached the rate-limiting threshold.
      boolean resetPublishCount()
      reset current publish count.
      boolean tryAcquire​(int numbers, long bytes)
      try to acquire permit.
      void update​(org.apache.pulsar.common.policies.data.Policies policies, java.lang.String clusterName)
      updates rate-limiting threshold based on policies.
      void update​(org.apache.pulsar.common.policies.data.PublishRate maxPublishRate)
      updates rate-limiting threshold based on passed in rate limiter.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PublishRateLimiterDisable

        public PublishRateLimiterDisable()
    • Method Detail

      • checkPublishRate

        public void checkPublishRate()
        Description copied from interface: PublishRateLimiter
        checks and update state of current publish and marks if it has exceeded the rate-limiting threshold.
        Specified by:
        checkPublishRate in interface PublishRateLimiter
      • update

        public void update​(org.apache.pulsar.common.policies.data.Policies policies,
                           java.lang.String clusterName)
        Description copied from interface: PublishRateLimiter
        updates rate-limiting threshold based on policies.
        Specified by:
        update in interface PublishRateLimiter
      • update

        public void update​(org.apache.pulsar.common.policies.data.PublishRate maxPublishRate)
        Description copied from interface: PublishRateLimiter
        updates rate-limiting threshold based on passed in rate limiter.
        Specified by:
        update in interface PublishRateLimiter
      • close

        public void close()
        Description copied from interface: PublishRateLimiter
        Close the limiter.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface PublishRateLimiter