Lightweight Bartering Grid

lbg.peer.strategy.ranking
Class MC4Ranking

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

public class MC4Ranking
extends CommonRanking

MC4Ranking ranks Grantors (i.e. potential Supplier Peers who sent Consumption Grants) by decreasing MC4.

Author:
Cyril Briquet

Constructor Summary
MC4Ranking(ConsumptionGrantsContainer c_g, JobConsumptionOutcomeTracker jcot, boolean do_blacklist)
           
 
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
 

Constructor Detail

MC4Ranking

public MC4Ranking(ConsumptionGrantsContainer c_g,
                  JobConsumptionOutcomeTracker jcot,
                  boolean do_blacklist)
           throws GridException
Throws:
GridException
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.