|
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.SupplierReliabilityHistory
public class SupplierReliabilityHistory
A SupplierReliabilityHistory describes the reliability of a Supplier Peer for a given Job.
Stores Task completion and cancellation counts for target Supplier and Job.
Constructor Summary | |
---|---|
SupplierReliabilityHistory()
Constructs a new SupplierReliabilityHistory. |
|
SupplierReliabilityHistory(SupplierReliabilityHistory b)
Constructs a new SupplierReliabilityHistory, using target Supplier Reliability behavior to set initial Task completion/cancellation counts, i.e. |
Method Summary | |
---|---|
void |
accountCancelledTask()
|
void |
accountCompletedTask()
|
int |
compareTo(SupplierReliabilityHistory other)
Comparable implementation. |
boolean |
equals(java.lang.Object obj)
|
int |
getCancelledTasksCount()
|
int |
getCompletedTasksCount()
|
int |
hashCode()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SupplierReliabilityHistory()
public SupplierReliabilityHistory(SupplierReliabilityHistory b) throws GridException
GridException
- if a parameter is illegalMethod Detail |
---|
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(SupplierReliabilityHistory other)
Compares 2 Supplier Reliability behaviors.
Smaller value is assigned to the more reliable Peer. Precisely, Peers with less cancelled Tasks is ranked first (i.e. lower). For couple of Peers with the same number of cancelled Tasks, the Peer with the most completed Tasks is ranked first (i.e. lower).
compareTo
in interface java.lang.Comparable<SupplierReliabilityHistory>
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public int getCompletedTasksCount()
public int getCancelledTasksCount()
public void accountCompletedTask()
public void accountCancelledTask()
|
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.