org.apache.camel.processor.loadbalancer
Class WeightedLoadBalancer

java.lang.Object
  extended by org.apache.camel.impl.ServiceSupport
      extended by org.apache.camel.processor.loadbalancer.LoadBalancerSupport
          extended by org.apache.camel.processor.loadbalancer.QueueLoadBalancer
              extended by org.apache.camel.processor.loadbalancer.WeightedLoadBalancer
All Implemented Interfaces:
AsyncProcessor, Navigate<Processor>, Processor, LoadBalancer, Service, ShutdownableService
Direct Known Subclasses:
WeightedRandomLoadBalancer, WeightedRoundRobinLoadBalancer

public abstract class WeightedLoadBalancer
extends QueueLoadBalancer


Field Summary
 
Fields inherited from class org.apache.camel.processor.loadbalancer.LoadBalancerSupport
log
 
Constructor Summary
WeightedLoadBalancer(List<Integer> distributionRatios)
           
 
Method Summary
protected  void deepCloneDistributionRatios(List<Integer> distributionRatios)
           
protected  void doStart()
           
 List<Integer> getDistributionRatioList()
           
 ArrayList<DistributionRatio> getRuntimeRatios()
           
protected  boolean isRuntimeRatiosZeroed()
           
protected  void loadRuntimeRatios(List<Integer> distributionRatios)
           
protected  void resetRuntimeRatios()
           
 void setDistributionRatioList(List<Integer> distributionRatioList)
           
 void setRuntimeRatios(ArrayList<DistributionRatio> runtimeRatios)
           
 
Methods inherited from class org.apache.camel.processor.loadbalancer.QueueLoadBalancer
chooseProcessor, process, process
 
Methods inherited from class org.apache.camel.processor.loadbalancer.LoadBalancerSupport
addProcessor, doStop, getProcessors, hasNext, next, removeProcessor
 
Methods inherited from class org.apache.camel.impl.ServiceSupport
addChildService, doResume, doShutdown, doSuspend, getStatus, getVersion, isRunAllowed, isStarted, isStarting, isStopped, isStopping, isSuspended, isSuspending, removeChildService, resume, shutdown, start, start, stop, suspend
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeightedLoadBalancer

public WeightedLoadBalancer(List<Integer> distributionRatios)
Method Detail

deepCloneDistributionRatios

protected void deepCloneDistributionRatios(List<Integer> distributionRatios)

doStart

protected void doStart()
                throws Exception
Overrides:
doStart in class LoadBalancerSupport
Throws:
Exception

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 ArrayList<DistributionRatio> getRuntimeRatios()

setRuntimeRatios

public void setRuntimeRatios(ArrayList<DistributionRatio> runtimeRatios)


Apache CAMEL