Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## lbg.peer.strategy.ranking
Class MCoSConsumptionRanking

    java.lang.Object
      lbg.peer.strategy.ranking.CommonRanking
          lbg.peer.strategy.ranking.MCoSConsumptionRanking

All Implemented Interfaces:
  Ranking

    public class MCoSConsumptionRanking

extends CommonRanking

MCoSConsumptionRanking ranks Grantors (i.e. potential Supplier Peers who sent Consumption Grants) first by decreasing mean Consumption completion stride, then by decreasing (mean,current) normalized stride distance between the current and the mean Consumption completion stride.

Author:
  Cyril Briquet

Constructor Summary
`MCoSConsumptionRanking(ConsumptionGrantsContainer c_g, JobConsumptionOutcomeTracker jcot, boolean do_blacklist)`

Method Summary
`int` | `getBlacklistedPeerCount()` Ranking implementation.
`int` | `getRankedPeerCount()` Ranking implementation.
`int` | `getUnrankedPeerCount()` Ranking implementation.
`static double` | `normalizedStrideDistance(PeerBarteringProfile peer_bp)` Computes the normalized difference between the mean and the most recent Consumption Completion Stride of target Supplier.
`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

### MCoSConsumptionRanking

    public MCoSConsumptionRanking(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.

### normalizedStrideDistance

    public static double normalizedStrideDistance(PeerBarteringProfile peer_bp)
                                           throws GridException

  Computes the normalized difference between the mean and the most recent Consumption Completion Stride of target Supplier.

  A high normalized stride distance, i.e. close to 1.0, indicates a high probability of success of a Consumption Task submitted right now to the target Supplier.

  Parameters:
    `peer_bp` - target Supplier Bartering Profile
  Returns:
    normalized (i.e. included in [0.0..1.0]) stride distance
  Throws:
    `GridException` - if a parameter is illegal

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Lightweight Bartering Grid
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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