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.logshutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending| Constructor and Description |
|---|
StickyLoadBalancer(Expression correlationExpression) |
| Modifier and Type | Method and Description |
|---|---|
protected Processor |
chooseProcessor(List<Processor> processors,
Exchange exchange) |
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(Processor processor)
Removes the given processor from the load balancer
|
void |
setNumberOfHashGroups(int numberOfHashGroups) |
String |
toString() |
processaddProcessor, doShutdown, doStart, doStop, getId, getProcessors, hasNext, next, process, setIddoResume, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic StickyLoadBalancer(Expression correlationExpression)
protected Processor chooseProcessor(List<Processor> processors, Exchange exchange)
chooseProcessor in class QueueLoadBalancerpublic void removeProcessor(Processor processor)
LoadBalancerremoveProcessor in interface LoadBalancerremoveProcessor in class LoadBalancerSupportprocessor - the processor to be removed from the load balancerpublic int getLastChosenProcessorIndex()
public Expression getCorrelationExpression()
public int getNumberOfHashGroups()
public void setNumberOfHashGroups(int numberOfHashGroups)
protected Object getStickyKey(Object value)
value - the correlation valueApache Camel