|
Lightweight Bartering Grid | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectlbg.peer.register.learning.consumption.JobConsumptionOutcomeTracker
public class JobConsumptionOutcomeTracker
A JobConsumptionOutcomeTracker tracks completion/cancellation of the Job's Tasks by the involved Supplier Peers, providing a useful reliability metric that may be used to black-list unreliable Suppliers.
Field Summary | |
---|---|
static float |
MAX_CONSUMPTION_FAILURES_FACTOR
Number of allowed Task execution failures for the Tasks of the Job before its Tasks are restricted to execution as Local Tasks only, expressed as a factor of the number of Tasks of the Job. |
static float |
MAX_SUPPLIER_FAILURES_FACTOR
Number of allowed Task execution failures for the Tasks of the Job before supplier Peer is black-listed (for the current Job), expressed as a factor of the number of Tasks of the Job. |
Constructor Summary | |
---|---|
JobConsumptionOutcomeTracker(java.lang.String owner_peer_id,
int job_id,
int total_job_tasks)
|
Method Summary | |
---|---|
double |
estimateConsumptionTaskRuntime()
|
int |
getCompletedConsumptionTasksCount()
|
static void |
main(java.lang.String[] args)
For testing purposes only. |
java.util.ArrayList<java.lang.String> |
rankPeers()
Return reliability ranking of Supplier Peers (i.e. |
boolean |
shouldBlackListPeer(java.lang.String supplier_id)
Indicates whether the target supplier should be blacklisted, i.e. |
boolean |
shouldBlackListPeer(SupplierReliabilityHistory b)
Indicates whether a supplier with target reliability behavior should be blacklisted, i.e. |
boolean |
shouldRestrictJobToLocalExecution()
Indicates whether the Tasks of the tracked Job can be executed as Consumption Tasks, or if it is preferable not to, because it comes that these are extremely difficult to execute by Supplier Peers (either intrinsically, or because the environment is totally unreliable). |
java.util.Iterator<java.lang.String> |
suppliers()
Return the set of Peers that have supplied Resources for Consumption Tasks of the Job tracked by this tracker. |
java.lang.String |
toString()
|
void |
trackCancelledTask(java.lang.String supplier_peer,
long runtime)
|
void |
trackCompletedTask(java.lang.String supplier_peer,
long runtime)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final float MAX_CONSUMPTION_FAILURES_FACTOR
public static final float MAX_SUPPLIER_FAILURES_FACTOR
Constructor Detail |
---|
public JobConsumptionOutcomeTracker(java.lang.String owner_peer_id, int job_id, int total_job_tasks) throws GridException
GridException
Method Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public void trackCompletedTask(java.lang.String supplier_peer, long runtime) throws GridException
GridException
public void trackCancelledTask(java.lang.String supplier_peer, long runtime) throws GridException
GridException
public double estimateConsumptionTaskRuntime()
public int getCompletedConsumptionTasksCount()
public boolean shouldRestrictJobToLocalExecution() throws GridException
GridException
public boolean shouldBlackListPeer(SupplierReliabilityHistory b) throws GridException
GridException
public boolean shouldBlackListPeer(java.lang.String supplier_id) throws GridException
GridException
public java.util.ArrayList<java.lang.String> rankPeers() throws GridException
The most unreliable Peers are excluded from the ranking.
GridException
- if an error occurs while ranking Supplierspublic java.util.Iterator<java.lang.String> suppliers()
public static void main(java.lang.String[] args)
|
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.