public class FailOverLoadBalancer extends LoadBalancerSupport implements org.apache.camel.Traceable, org.apache.camel.CamelContextAware
Pipeline in the async variation
 as the failover load balancer is a specialized pipeline. So the trick is to keep doing the same as the
 pipeline to ensure it works the same and the async routing engine is flawless.| Modifier and Type | Class and Description | 
|---|---|
| protected class  | FailOverLoadBalancer.State | 
| Constructor and Description | 
|---|
| FailOverLoadBalancer() | 
| FailOverLoadBalancer(List<Class<?>> exceptions) | 
| Modifier and Type | Method and Description | 
|---|---|
| protected void | doStart() | 
| protected void | doStop() | 
| org.apache.camel.CamelContext | getCamelContext() | 
| ExceptionFailureStatistics | getExceptionFailureStatistics() | 
| List<Class<?>> | getExceptions() | 
| int | getLastGoodIndex() | 
| int | getMaximumFailoverAttempts() | 
| String | getTraceLabel() | 
| boolean | isRoundRobin() | 
| boolean | isRunAllowed() | 
| boolean | isSticky() | 
| protected org.apache.camel.Exchange | prepareExchangeForFailover(org.apache.camel.Exchange exchange)Prepares the exchange for failover | 
| boolean | process(org.apache.camel.Exchange exchange,
       org.apache.camel.AsyncCallback callback) | 
| void | reset() | 
| void | setCamelContext(org.apache.camel.CamelContext camelContext) | 
| void | setMaximumFailoverAttempts(int maximumFailoverAttempts) | 
| void | setRoundRobin(boolean roundRobin) | 
| void | setSticky(boolean sticky) | 
| protected boolean | shouldFailOver(org.apache.camel.Exchange exchange)Should the given failed Exchange failover? | 
addProcessor, doGetProcessors, doShutdown, getId, getProcessors, getRouteId, hasNext, next, removeProcessor, setId, setRouteId, toStringbuild, doBuild, doInit, doResume, doSuspend, getStatus, init, isBuild, isInit, isNew, isShutdown, isStarted, isStarting, isStartingOrStarted, isStopped, isStopping, isStoppingOrStopped, isSuspended, isSuspending, isSuspendingOrSuspended, resume, shutdown, start, stop, suspendpublic org.apache.camel.CamelContext getCamelContext()
getCamelContext in interface org.apache.camel.CamelContextAwarepublic void setCamelContext(org.apache.camel.CamelContext camelContext)
setCamelContext in interface org.apache.camel.CamelContextAwarepublic int getLastGoodIndex()
public boolean isRoundRobin()
public void setRoundRobin(boolean roundRobin)
public boolean isSticky()
public void setSticky(boolean sticky)
public int getMaximumFailoverAttempts()
public void setMaximumFailoverAttempts(int maximumFailoverAttempts)
protected boolean shouldFailOver(org.apache.camel.Exchange exchange)
exchange - the exchange that failedpublic boolean isRunAllowed()
isRunAllowed in interface org.apache.camel.StatefulServiceisRunAllowed in class org.apache.camel.support.service.ServiceSupportpublic boolean process(org.apache.camel.Exchange exchange,
                       org.apache.camel.AsyncCallback callback)
process in interface org.apache.camel.AsyncProcessorprotected org.apache.camel.Exchange prepareExchangeForFailover(org.apache.camel.Exchange exchange)
exchange - the exchangepublic String getTraceLabel()
getTraceLabel in interface org.apache.camel.Traceablepublic ExceptionFailureStatistics getExceptionFailureStatistics()
public void reset()
protected void doStart()
                throws Exception
doStart in class LoadBalancerSupportExceptionprotected void doStop()
               throws Exception
doStop in class LoadBalancerSupportExceptionApache Camel