org.apache.camel.processor.loadbalancer
Class WeightedLoadBalancer
java.lang.Object
org.apache.camel.support.ServiceSupport
org.apache.camel.processor.loadbalancer.LoadBalancerSupport
org.apache.camel.processor.loadbalancer.QueueLoadBalancer
org.apache.camel.processor.loadbalancer.WeightedLoadBalancer
- All Implemented Interfaces:
- AsyncProcessor, Navigate<Processor>, Processor, LoadBalancer, Service, ShutdownableService, StatefulService, SuspendableService
- Direct Known Subclasses:
- WeightedRandomLoadBalancer, WeightedRoundRobinLoadBalancer
public abstract class WeightedLoadBalancer
- extends QueueLoadBalancer
Methods inherited from class org.apache.camel.support.ServiceSupport |
doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, resume, shutdown, start, stop, suspend |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WeightedLoadBalancer
public WeightedLoadBalancer(List<Integer> distributionRatios)
deepCloneDistributionRatios
protected void deepCloneDistributionRatios(List<Integer> distributionRatios)
doStart
protected void doStart()
throws Exception
- Description copied from class:
ServiceSupport
- Implementations override this method to support customized start/stop.
Important: See
ServiceSupport.doStop()
for more details.
- Overrides:
doStart
in class LoadBalancerSupport
- Throws:
Exception
- See Also:
ServiceSupport.doStop()
loadRuntimeRatios
protected void loadRuntimeRatios(List<Integer> distributionRatios)
isRuntimeRatiosZeroed
protected boolean isRuntimeRatiosZeroed()
resetRuntimeRatios
protected void resetRuntimeRatios()
getDistributionRatioList
public List<Integer> getDistributionRatioList()
setDistributionRatioList
public void setDistributionRatioList(List<Integer> distributionRatioList)
getRuntimeRatios
public List<DistributionRatio> getRuntimeRatios()
setRuntimeRatios
public void setRuntimeRatios(ArrayList<DistributionRatio> runtimeRatios)
Apache CAMEL