org.apache.camel.processor.loadbalancer
Class WeightedLoadBalancer

java.lang.Object
  extended by org.apache.camel.support.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, StatefulService, SuspendableService
Direct Known Subclasses:
WeightedRandomLoadBalancer, WeightedRoundRobinLoadBalancer

public abstract class WeightedLoadBalancer
extends QueueLoadBalancer


Field Summary
 
Fields inherited from class org.apache.camel.processor.loadbalancer.LoadBalancerSupport
log
 
Fields inherited from class org.apache.camel.support.ServiceSupport
shutdown, shuttingdown, started, starting, stopped, stopping, suspended, suspending
 
Constructor Summary
WeightedLoadBalancer(List<Integer> distributionRatios)
           
 
Method Summary
protected  void deepCloneDistributionRatios(List<Integer> distributionRatios)
           
protected  void doStart()
          Implementations override this method to support customized start/stop.
 List<Integer> getDistributionRatioList()
           
 List<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.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
 

Constructor Detail

WeightedLoadBalancer

public WeightedLoadBalancer(List<Integer> distributionRatios)
Method Detail

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