Class TotalRequestsThrottler.ThrottlingState

java.lang.Object
org.apache.camel.processor.TotalRequestsThrottler.ThrottlingState
Enclosing class:
TotalRequestsThrottler

protected class TotalRequestsThrottler.ThrottlingState extends Object
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    calculateAndSetMaxRequestsPerPeriod(org.apache.camel.Exchange exchange)
    Evaluates the maxRequestsPerPeriodExpression and adjusts the throttle rate up or down.
    void
     
    void
    enqueue(org.apache.camel.processor.TotalRequestsThrottler.ThrottlePermit permit, org.apache.camel.Exchange exchange)
    Returns a permit to the DelayQueue, first resetting it's delay to be relative to now.
    int
     
    org.apache.camel.processor.TotalRequestsThrottler.ThrottlePermit
     
    org.apache.camel.processor.TotalRequestsThrottler.ThrottlePermit
     
    org.apache.camel.processor.TotalRequestsThrottler.ThrottlePermit
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getThrottleRate

      public int getThrottleRate()
    • poll

      public org.apache.camel.processor.TotalRequestsThrottler.ThrottlePermit poll()
    • peek

      public org.apache.camel.processor.TotalRequestsThrottler.ThrottlePermit peek()
    • take

      public org.apache.camel.processor.TotalRequestsThrottler.ThrottlePermit take() throws InterruptedException
      Throws:
      InterruptedException
    • clean

      public void clean()
    • enqueue

      public void enqueue(org.apache.camel.processor.TotalRequestsThrottler.ThrottlePermit permit, org.apache.camel.Exchange exchange)
      Returns a permit to the DelayQueue, first resetting it's delay to be relative to now.
    • calculateAndSetMaxRequestsPerPeriod

      public void calculateAndSetMaxRequestsPerPeriod(org.apache.camel.Exchange exchange) throws Exception
      Evaluates the maxRequestsPerPeriodExpression and adjusts the throttle rate up or down.
      Throws:
      Exception