public class StickyLoadBalancer extends QueueLoadBalancer
Expression to calculate
a correlation key to perform the sticky load balancing; rather like jsessionid in the web
or JMSXGroupID in JMS.| Constructor and Description |
|---|
StickyLoadBalancer(org.apache.camel.Expression correlationExpression) |
| Modifier and Type | Method and Description |
|---|---|
protected org.apache.camel.AsyncProcessor |
chooseProcessor(org.apache.camel.AsyncProcessor[] processors,
org.apache.camel.Exchange exchange) |
org.apache.camel.Expression |
getCorrelationExpression() |
int |
getLastChosenProcessorIndex() |
int |
getNumberOfHashGroups() |
protected Object |
getStickyKey(Object value)
A strategy to create the key for the sticky load balancing map.
|
void |
removeProcessor(org.apache.camel.AsyncProcessor processor)
Removes the given processor from the load balancer
|
void |
setNumberOfHashGroups(int numberOfHashGroups) |
processaddProcessor, doGetProcessors, doInit, doShutdown, doStart, doStop, getId, getProcessors, getRouteId, hasNext, next, setId, setRouteId, toStringbuild, doBuild, doFail, doLifecycleChange, doResume, doSuspend, fail, getStatus, init, isBuild, isInit, isNew, isRunAllowed, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic StickyLoadBalancer(org.apache.camel.Expression correlationExpression)
protected org.apache.camel.AsyncProcessor chooseProcessor(org.apache.camel.AsyncProcessor[] processors,
org.apache.camel.Exchange exchange)
chooseProcessor in class QueueLoadBalancerpublic void removeProcessor(org.apache.camel.AsyncProcessor processor)
LoadBalancerremoveProcessor in interface LoadBalancerremoveProcessor in class LoadBalancerSupportprocessor - the processor to be removed from the load balancerpublic int getLastChosenProcessorIndex()
public org.apache.camel.Expression getCorrelationExpression()
public int getNumberOfHashGroups()
public void setNumberOfHashGroups(int numberOfHashGroups)
protected Object getStickyKey(Object value)
value - the correlation valueApache Camel