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 StorageAffinityConsumptionRanking

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

All Implemented Interfaces:
  Ranking

    public class StorageAffinityConsumptionRanking

extends CommonRanking

StorageAffinityConsumptionRanking ranks Grantors (i.e. potential Supplier Peers who sent Consumption Grants) by decreasing Storage Affinity for target Task.

Author:
  Cyril Briquet

Constructor Summary
`StorageAffinityConsumptionRanking(ConsumptionGrantsContainer c_g, ConsumptionDataTracker data_tracker, Task t, JobConsumptionOutcomeTracker jcot, boolean do_blacklist, float blacklist_proba)` Constructs a new StorageAffinityConsumptionRanking.
`StorageAffinityConsumptionRanking(ConsumptionGrantsContainer c_g, ConsumptionDataTracker data_tracker, Task t, JobConsumptionOutcomeTracker jcot, boolean do_blacklist, float blacklist_proba, boolean apply_tcor)` Constructs a new StorageAffinityConsumptionRanking.

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

### StorageAffinityConsumptionRanking

    public StorageAffinityConsumptionRanking(ConsumptionGrantsContainer c_g,
                                             ConsumptionDataTracker data_tracker,
                                             Task t,
                                             JobConsumptionOutcomeTracker jcot,
                                             boolean do_blacklist,
                                             float blacklist_proba)
                                      throws GridException

  Constructs a new StorageAffinityConsumptionRanking.

  Note that Peers with no Storage Affinity are not ranked.

  Parameters:
    `c_g` - Consumption Grants container
    `data_tracker` - data tracker
    `t` - target Task
    `jcot` - JobConsumptionOutcomeTracker
    `do_blacklist` - true to activate blacklisting of suppliers estimated be unreliable at the Job-level
  Throws:
    `GridException` - if a parameter is illegal

### StorageAffinityConsumptionRanking

    public StorageAffinityConsumptionRanking(ConsumptionGrantsContainer c_g,
                                             ConsumptionDataTracker data_tracker,
                                             Task t,
                                             JobConsumptionOutcomeTracker jcot,
                                             boolean do_blacklist,
                                             float blacklist_proba,
                                             boolean apply_tcor)
                                      throws GridException

  Constructs a new StorageAffinityConsumptionRanking.

  Note that Peers with no Storage Affinity are not ranked.

  Parameters:
    `c_g` - Consumption Grants container
    `data_tracker` - data tracker
    `t` - target Task
    `jcot` - JobConsumptionOutcomeTracker
    `do_blacklist` - true to activate blacklisting of suppliers estimated be unreliable at the Job-level
  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.

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.