org.objectweb.proactive.p2p.loadbalancer
Class P2PLoadBalancer
java.lang.Object
org.objectweb.proactive.loadbalancing.LoadBalancer
org.objectweb.proactive.p2p.loadbalancer.P2PLoadBalancer
- All Implemented Interfaces:
- Active, ProActiveInternalObject, RunActive
public class P2PLoadBalancer
- extends LoadBalancer
- implements RunActive, ProActiveInternalObject
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
balancerName
protected java.lang.String balancerName
randomizer
protected java.util.Random randomizer
p2pService
protected P2PService p2pService
acquaintances
protected java.util.Vector acquaintances
forBalancing
protected java.util.Vector forBalancing
forStealing
protected java.util.Vector forStealing
myThis
protected P2PLoadBalancer myThis
ranking
protected double ranking
P2PLoadBalancer
public P2PLoadBalancer()
addToBalanceList
protected void addToBalanceList(int n)
addToStealList
protected void addToStealList(int n)
getRanking
public double getRanking()
ping
protected long ping(java.lang.String nodeAddress)
startBalancing
public void startBalancing()
- This method use the P2P infrastructure to search nodes which can
receive its active objects. Method extended from LoadBalancer class.
- Overrides:
startBalancing
in class LoadBalancer
getActiveObjectsFrom
protected void getActiveObjectsFrom(P2PLoadBalancer remoteBalancer,
double remoteRanking)
stealWork
public void stealWork()
- This method use the P2P infrastructure to search nodes which I
can steal work. Method extended from LoadBalancer class.
- Overrides:
stealWork
in class LoadBalancer
sendActiveObjectsTo
public void sendActiveObjectsTo(Node remoteNode,
double remoteRanking)
- Overrides:
sendActiveObjectsTo
in class LoadBalancer
runActivity
public void runActivity(Body body)
- Description copied from interface:
RunActive
- Runs the activity of the active object.
- Specified by:
runActivity
in interface RunActive
- Parameters:
body
- the body of the active object being started
killMePlease
public void killMePlease()
init
public void init()
Copyright 2001-2007 INRIA All Rights Reserved.