org.objectweb.proactive.p2p.loadbalancer
Class P2PLoadBalancer

java.lang.Object
  extended byorg.objectweb.proactive.loadbalancing.LoadBalancer
      extended byorg.objectweb.proactive.p2p.loadbalancer.P2PLoadBalancer

public class P2PLoadBalancer
extends org.objectweb.proactive.loadbalancing.LoadBalancer


Field Summary
 
Fields inherited from class org.objectweb.proactive.loadbalancing.LoadBalancer
lm, logger, myLoad, normalization, ranking, underloaded
 
Constructor Summary
P2PLoadBalancer(P2PService p2pSer)
           
 
Method Summary
 boolean AreYouUnderloaded(double remoteRanking)
          This method is to know if this machine is underloaded and "better" than who want to send active objects receive its active objects.
 void ImStealingYou(double remoteRanking, java.lang.String remoteNodeAddress)
           
 void startBalancing()
          This method use the P2P infrastructure to search nodes which can receive its active objects.
 void stealWork()
          This method use the P2P infrastructure to search nodes which I can steal work.
 
Methods inherited from class org.objectweb.proactive.loadbalancing.LoadBalancer
AreYouUnderloaded, register, sendActiveObjectsTo
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

P2PLoadBalancer

public P2PLoadBalancer(P2PService p2pSer)
Method Detail

startBalancing

public void startBalancing()
This method use the P2P infrastructure to search nodes which can receive its active objects.


stealWork

public void stealWork()
This method use the P2P infrastructure to search nodes which I can steal work.


AreYouUnderloaded

public boolean AreYouUnderloaded(double remoteRanking)
This method is to know if this machine is underloaded and "better" than who want to send active objects receive its active objects.

Parameters:
remoteRanking - ranking of the overloaded machine
Returns:
true if this machine is underloaded in relation to the overloaded one. Else false.

ImStealingYou

public void ImStealingYou(double remoteRanking,
                          java.lang.String remoteNodeAddress)


Copyright 2001-2005 INRIA All Rights Reserved.