org.codehaus.wadi.location.balancing
Class BasicPartitionBalancer
java.lang.Object
org.codehaus.wadi.location.balancing.BasicPartitionBalancer
- All Implemented Interfaces:
- Lifecycle, PartitionBalancer
public class BasicPartitionBalancer
- extends java.lang.Object
- implements PartitionBalancer
- Version:
- $Revision: 1538 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicPartitionBalancer
public BasicPartitionBalancer(org.codehaus.wadi.group.Dispatcher dispatcher,
int nbPartitions)
start
public void start()
throws java.lang.Exception
- Specified by:
start
in interface Lifecycle
- Throws:
java.lang.Exception
stop
public void stop()
throws java.lang.Exception
- Specified by:
stop
in interface Lifecycle
- Throws:
java.lang.Exception
balancePartitions
public void balancePartitions()
throws org.codehaus.wadi.group.MessageExchangeException
- Specified by:
balancePartitions
in interface PartitionBalancer
- Throws:
org.codehaus.wadi.group.MessageExchangeException
fetchBalancingInfoState
protected java.util.Map fetchBalancingInfoState(java.util.Set peers)
throws org.codehaus.wadi.group.MessageExchangeException
- Throws:
org.codehaus.wadi.group.MessageExchangeException
publishBalancingInfoUpdate
protected void publishBalancingInfoUpdate(java.util.Map peerToBalancingState,
PartitionInfoUpdates partitionInfoUpdates)
throws org.codehaus.wadi.group.MessageExchangeException
- Throws:
org.codehaus.wadi.group.MessageExchangeException
newBalancingStrategy
protected PartitionBalancingStrategy newBalancingStrategy(int nbPartitions,
java.util.Map peerToBalancingInfoState)
Copyright © 2010. All Rights Reserved.