* @param roundRobin whether or not to use round robin (which keeps state)
* @param exceptions exception classes which we want to failover if one of them was thrown
* @return the builder
*/
public LoadBalanceDefinition failover(int maximumFailoverAttempts, boolean inheritErrorHandler, boolean roundRobin, Class<?>... exceptions) {
FailOverLoadBalancer failover = new FailOverLoadBalancer(Arrays.asList(exceptions));
failover.setMaximumFailoverAttempts(maximumFailoverAttempts);
failover.setRoundRobin(roundRobin);
setLoadBalancerType(new LoadBalancerDefinition(failover));
this.setInheritErrorHandler(inheritErrorHandler);
return this;
}