Lightweight Bartering Grid

lbg.peer.register
Class NeighborhoodBarteringProfile

java.lang.Object
  extended by lbg.peer.register.NeighborhoodBarteringProfile

public class NeighborhoodBarteringProfile
extends java.lang.Object

Author:
Cyril Briquet

Constructor Summary
NeighborhoodBarteringProfile(Peer managed_peer, PeerRegister grid_register)
           
 
Method Summary
 void accountConsumptionCancellation(java.lang.String supplier_id, Task t, long start_time)
           
 void accountConsumptionCompletion(Task t, long xstart_time)
           
 void accountLocalActivityCancellation(Task t)
           
 void accountLocalActivityCompletion(Task t)
           
 void accountSupplyingCancellation(Task t, long start_time)
           
 void accountSupplyingCompletion(Task t, long xstart_time)
           
 double estimateSupplyingTaskRuntime()
           
 double getFavorRatio()
          Returns Favor Ratio of the managed Peer.
 double getResourceGain()
          Returns Resource Gain of the managed Peer.
 long getTotalConsumedLocalPower()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NeighborhoodBarteringProfile

public NeighborhoodBarteringProfile(Peer managed_peer,
                                    PeerRegister grid_register)
                             throws GridException
Throws:
GridException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

accountLocalActivityCompletion

public void accountLocalActivityCompletion(Task t)
                                    throws GridException
Throws:
GridException

accountSupplyingCompletion

public void accountSupplyingCompletion(Task t,
                                       long xstart_time)
                                throws GridException
Throws:
GridException

accountConsumptionCompletion

public void accountConsumptionCompletion(Task t,
                                         long xstart_time)
                                  throws GridException
Throws:
GridException

accountLocalActivityCancellation

public void accountLocalActivityCancellation(Task t)
                                      throws GridException
Throws:
GridException

accountSupplyingCancellation

public void accountSupplyingCancellation(Task t,
                                         long start_time)
                                  throws GridException
Throws:
GridException

accountConsumptionCancellation

public void accountConsumptionCancellation(java.lang.String supplier_id,
                                           Task t,
                                           long start_time)
                                    throws GridException
Throws:
GridException

getTotalConsumedLocalPower

public long getTotalConsumedLocalPower()

getFavorRatio

public double getFavorRatio()
Returns Favor Ratio of the managed Peer.

Favor Ratio = consumed external power / supplied local power


getResourceGain

public double getResourceGain()
Returns Resource Gain of the managed Peer.

Resource Gain = consumed local power + external power / consumed local power


estimateSupplyingTaskRuntime

public double estimateSupplyingTaskRuntime()
Returns:
an estimate of the runtime of a Supplying Task over all profiled Peers (>= 0.0), or -1.0 if no estimate is available

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.