@Metadata(label="eip,routing") public class LoadBalanceDefinition extends OutputDefinition<LoadBalanceDefinition>
outputs
inheritErrorHandler, log
Constructor and Description |
---|
LoadBalanceDefinition() |
Modifier and Type | Method and Description |
---|---|
LoadBalanceDefinition |
custom(String ref)
Uses the custom load balancer
|
LoadBalanceDefinition |
failover()
Uses fail over load balancer
Will not round robin and inherit the error handler.
|
LoadBalanceDefinition |
failover(Class<?>... exceptions)
Uses fail over load balancer
Will not round robin and inherit the error handler.
|
LoadBalanceDefinition |
failover(int maximumFailoverAttempts,
boolean inheritErrorHandler,
boolean roundRobin,
boolean sticky,
Class<?>... exceptions)
Uses fail over load balancer
|
LoadBalanceDefinition |
failover(int maximumFailoverAttempts,
boolean inheritErrorHandler,
boolean roundRobin,
Class<?>... exceptions)
Uses fail over load balancer
|
String |
getLabel()
Returns a label to describe this node such as the expression if some kind of expression node
|
LoadBalancerDefinition |
getLoadBalancerType() |
List<ProcessorDefinition<?>> |
getOutputs() |
String |
getShortName() |
LoadBalanceDefinition |
loadBalance(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
Uses a custom load balancer
|
LoadBalanceDefinition |
random()
Uses random load balancer
|
LoadBalanceDefinition |
roundRobin()
Uses round robin load balancer
|
void |
setLoadBalancerType(LoadBalancerDefinition loadbalancer)
The load balancer to be used
|
void |
setOutputs(List<ProcessorDefinition<?>> outputs) |
LoadBalanceDefinition |
sticky(org.apache.camel.Expression correlationExpression)
Uses sticky load balancer
|
LoadBalanceDefinition |
topic()
Uses topic load balancer
|
String |
toString() |
LoadBalanceDefinition |
weighted(boolean roundRobin,
String distributionRatio)
Uses weighted load balancer
|
LoadBalanceDefinition |
weighted(boolean roundRobin,
String distributionRatio,
String distributionRatioDelimiter)
Uses weighted load balancer
|
addInterceptStrategy, addOutput, aggregate, aggregate, aggregate, aggregate, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, bean, choice, circuitBreaker, claimCheck, claimCheck, claimCheck, claimCheck, clearOutput, configureChild, convertBodyTo, convertBodyTo, delay, delay, delay, doTry, dynamicRouter, dynamicRouter, end, endChoice, endCircuitBreaker, endDoTry, endParent, endRest, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrich, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, enrichWith, filter, filter, filter, filter, getIndex, getInterceptStrategies, getParent, id, idempotentConsumer, idempotentConsumer, idempotentConsumer, inheritErrorHandler, inOnly, inOnly, inOnly, inOnly, inOnly, inOut, inOut, inOut, inOut, inOut, isAbstract, isInheritErrorHandler, isTopLevelOnly, isWrappingEntireOutput, kamelet, loadBalance, log, log, log, log, log, log, loop, loop, loop, loopDoWhile, loopDoWhile, markRollbackOnly, markRollbackOnlyLast, marshal, marshal, marshal, marshal, multicast, multicast, multicast, onCompletion, onException, onException, pipeline, pipeline, pipeline, pipeline, policy, policy, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrich, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, pollEnrichWith, preCreateProcessor, process, process, process, recipientList, recipientList, recipientList, recipientList, removeHeader, removeHeaders, removeHeaders, removeProperties, removeProperties, removeProperty, resequence, resequence, rollback, rollback, routeDescription, routeGroup, routeId, routingSlip, routingSlip, routingSlip, saga, sample, sample, sample, sample, script, script, serviceCall, serviceCall, serviceCall, setBody, setBody, setBody, setExchangePattern, setHeader, setHeader, setHeader, setInheritErrorHandler, setParent, setProperty, setProperty, setProperty, sort, sort, sort, split, split, split, split, startupOrder, step, step, stop, threads, threads, threads, threads, throttle, throttle, throttle, throttle, throttle, throwException, throwException, to, to, to, to, to, to, to, to, to, to, to, to, to, to, toD, toD, toD, toD, toD, toD, toD, toF, transacted, transacted, transform, transform, unmarshal, unmarshal, unmarshal, unmarshal, validate, validate, validate, wireTap, wireTap, wireTap
description, description, getCustomId, getDescription, getDescriptionText, getId, hasCustomIdAssigned, idOrCreate, setCustomId, setDescription, setGeneratedId, setId
public List<ProcessorDefinition<?>> getOutputs()
getOutputs
in class OutputDefinition<LoadBalanceDefinition>
public void setOutputs(List<ProcessorDefinition<?>> outputs)
setOutputs
in class OutputDefinition<LoadBalanceDefinition>
public LoadBalancerDefinition getLoadBalancerType()
public void setLoadBalancerType(LoadBalancerDefinition loadbalancer)
public LoadBalanceDefinition loadBalance(org.apache.camel.processor.loadbalancer.LoadBalancer loadBalancer)
loadBalance
in class ProcessorDefinition<LoadBalanceDefinition>
loadBalancer
- the load balancerpublic LoadBalanceDefinition failover()
public LoadBalanceDefinition failover(Class<?>... exceptions)
exceptions
- exception classes which we want to failover if one of them was thrownpublic LoadBalanceDefinition failover(int maximumFailoverAttempts, boolean inheritErrorHandler, boolean roundRobin, Class<?>... exceptions)
maximumFailoverAttempts
- maximum number of failover attempts before exhausting. Use -1 to newer exhaust
when round robin is also enabled. If round robin is disabled then it will exhaust
when there are no more endpoints to failoverinheritErrorHandler
- whether or not to inherit error handler. If false then it will failover
immediately in case of an exceptionroundRobin
- whether or not to use round robin (which keeps state)exceptions
- exception classes which we want to failover if one of them was thrownpublic LoadBalanceDefinition failover(int maximumFailoverAttempts, boolean inheritErrorHandler, boolean roundRobin, boolean sticky, Class<?>... exceptions)
maximumFailoverAttempts
- maximum number of failover attempts before exhausting. Use -1 to newer exhaust
when round robin is also enabled. If round robin is disabled then it will exhaust
when there are no more endpoints to failoverinheritErrorHandler
- whether or not to inherit error handler. If false then it will failover
immediately in case of an exceptionroundRobin
- whether or not to use round robin (which keeps state)sticky
- whether or not to use sticky (which keeps state)exceptions
- exception classes which we want to failover if one of them was thrownpublic LoadBalanceDefinition weighted(boolean roundRobin, String distributionRatio)
roundRobin
- used to set the processor selection algorithm.distributionRatio
- String of weighted ratios for distribution of messages.public LoadBalanceDefinition weighted(boolean roundRobin, String distributionRatio, String distributionRatioDelimiter)
roundRobin
- used to set the processor selection algorithm.distributionRatio
- String of weighted ratios for distribution of messages.distributionRatioDelimiter
- String containing delimiter to be used for ratiospublic LoadBalanceDefinition roundRobin()
public LoadBalanceDefinition random()
public LoadBalanceDefinition custom(String ref)
ref
- reference to lookup a custom load balancer from the Registry
to be used.public LoadBalanceDefinition sticky(org.apache.camel.Expression correlationExpression)
correlationExpression
- the expression for correlationpublic LoadBalanceDefinition topic()
public String getShortName()
getShortName
in interface org.apache.camel.NamedNode
getShortName
in class OutputDefinition<LoadBalanceDefinition>
public String getLabel()
ProcessorDefinition
getLabel
in interface org.apache.camel.NamedNode
getLabel
in class ProcessorDefinition<LoadBalanceDefinition>
public String toString()
toString
in class OutputDefinition<LoadBalanceDefinition>
Apache Camel