Package org.apache.camel.processor
Class ConcurrentRequestsThrottler.ThrottlingState
java.lang.Object
org.apache.camel.processor.ConcurrentRequestsThrottler.ThrottlingState
- Enclosing class:
ConcurrentRequestsThrottler
-
Method Summary
Modifier and TypeMethodDescriptionvoidacquire(org.apache.camel.Exchange exchange) voidcalculateAndSetMaxConcurrentRequestsExpression(org.apache.camel.Exchange exchange) Evaluates the maxConcurrentRequestsExpression and adjusts the throttle rate up or down.voidclean()intvoidrelease(org.apache.camel.Exchange exchange) Returns a permit.booleantryAcquire(org.apache.camel.Exchange exchange)
-
Method Details
-
getThrottleRate
public int getThrottleRate() -
clean
public void clean() -
tryAcquire
public boolean tryAcquire(org.apache.camel.Exchange exchange) -
acquire
- Throws:
InterruptedException
-
release
public void release(org.apache.camel.Exchange exchange) Returns a permit. -
calculateAndSetMaxConcurrentRequestsExpression
public void calculateAndSetMaxConcurrentRequestsExpression(org.apache.camel.Exchange exchange) throws Exception Evaluates the maxConcurrentRequestsExpression and adjusts the throttle rate up or down.- Throws:
Exception
-