Lightweight Bartering Grid

lbg.peer.strategy.ranking
Class PerformanceConsumptionRanking

java.lang.Object
  extended by lbg.peer.strategy.ranking.CommonRanking
      extended by lbg.peer.strategy.ranking.PerformanceConsumptionRanking
All Implemented Interfaces:
Ranking

public class PerformanceConsumptionRanking
extends CommonRanking

PerformanceConsumptionRanking ranks Grantors (i.e. potential Supplier Peers who sent Consumption Grants) by decreasing expected performance, excluding those estimated to be PERF_FACTOR times slower than the managed Peer.

Author:
Cyril Briquet

Field Summary
static double PERF_FACTOR
           
 
Constructor Summary
PerformanceConsumptionRanking(ConsumptionGrantsContainer c_g, double estimated_mean_self_runtime, JobConsumptionOutcomeTracker jcot, boolean do_blacklist)
          Constructs a new PerformanceConsumptionRanking.
 
Method Summary
 int getBlacklistedPeerCount()
          Ranking implementation.
 int getRankedPeerCount()
          Ranking implementation.
 int getUnrankedPeerCount()
          Ranking implementation.
 int[] peersRanking()
          Ranking implementation.
 java.lang.String toString()
          Ranking implementation.
 
Methods inherited from class lbg.peer.strategy.ranking.CommonRanking
getBlacklistedPeerRatio, getPeerCount, getRankedPeerRatio, getUnrankedPeerRatio
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PERF_FACTOR

public static final double PERF_FACTOR
See Also:
Constant Field Values
Constructor Detail

PerformanceConsumptionRanking

public PerformanceConsumptionRanking(ConsumptionGrantsContainer c_g,
                                     double estimated_mean_self_runtime,
                                     JobConsumptionOutcomeTracker jcot,
                                     boolean do_blacklist)
                              throws GridException
Constructs a new PerformanceConsumptionRanking.

Parameters:
c_g - Consumption Grants container
Throws:
GridException - if a parameter is illegal
Method Detail

toString

public java.lang.String toString()
Description copied from class: CommonRanking
Ranking implementation.

Specified by:
toString in interface Ranking
Overrides:
toString in class CommonRanking

peersRanking

public int[] peersRanking()
Ranking implementation.

Specified by:
peersRanking in interface Ranking
Specified by:
peersRanking in class CommonRanking
Returns:
Peers ranking, or null if no Peers can be ranked

getRankedPeerCount

public int getRankedPeerCount()
Ranking implementation.

Specified by:
getRankedPeerCount in interface Ranking
Specified by:
getRankedPeerCount in class CommonRanking

getUnrankedPeerCount

public int getUnrankedPeerCount()
Ranking implementation.

Specified by:
getUnrankedPeerCount in interface Ranking
Specified by:
getUnrankedPeerCount in class CommonRanking

getBlacklistedPeerCount

public int getBlacklistedPeerCount()
Ranking implementation.


Lightweight Bartering Grid

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