lbg.peer.register.bartering
Class TestPeerBarteringProfile
java.lang.Object
lbg.peer.register.bartering.PeerBarteringProfile
lbg.peer.register.bartering.TestPeerBarteringProfile
public class TestPeerBarteringProfile
- extends PeerBarteringProfile
- Author:
- Cyril Briquet
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TestPeerBarteringProfile
public TestPeerBarteringProfile(java.lang.String profiled_peer_id,
java.lang.String managed_peer_id)
throws GridException
- Throws:
GridException
toString
public java.lang.String toString()
- Overrides:
toString in class PeerBarteringProfile
getAccountant
public BarteringAccountantPolicy getAccountant()
throws GridException
- Overrides:
getAccountant in class PeerBarteringProfile
- Throws:
GridException
setAccountant
public void setAccountant(BarteringAccountantPolicy accountant)
throws GridException
- Overrides:
setAccountant in class PeerBarteringProfile
- Throws:
GridException
accountSupplyingCompletion
public double accountSupplyingCompletion(Task t,
long xstart_time,
long supplied_local_power)
throws GridException
- Overrides:
accountSupplyingCompletion in class PeerBarteringProfile
- Throws:
GridException
accountConsumptionCompletion
public double accountConsumptionCompletion(Task t,
long xstart_time,
long consumed_external_power)
throws GridException
- Overrides:
accountConsumptionCompletion in class PeerBarteringProfile
- Throws:
GridException
accountSupplyingCancellation
public void accountSupplyingCancellation(Task t,
long xstart_time)
throws GridException
- Overrides:
accountSupplyingCancellation in class PeerBarteringProfile
- Throws:
GridException
accountConsumptionCancellation
public void accountConsumptionCancellation(Task t,
long xstart_time)
throws GridException
- Overrides:
accountConsumptionCancellation in class PeerBarteringProfile
- Throws:
GridException
getTotalSuppliedLocalPower
@Deprecated
public long getTotalSuppliedLocalPower()
- Deprecated.
getTotalConsumedExternalPower
@Deprecated
public long getTotalConsumedExternalPower()
- Deprecated.
getTotalSuppliedFavors
public double getTotalSuppliedFavors()
- Overrides:
getTotalSuppliedFavors in class PeerBarteringProfile
getTotalConsumedFavors
public double getTotalConsumedFavors()
- Overrides:
getTotalConsumedFavors in class PeerBarteringProfile
getFavorsBalance
public double getFavorsBalance()
- Favors balance of managed Peer with target Peer
(guaranteed to be nonnegative).
- Overrides:
getFavorsBalance in class PeerBarteringProfile
getTotalCompletedConsumptionTasks
public long getTotalCompletedConsumptionTasks()
- Overrides:
getTotalCompletedConsumptionTasks in class PeerBarteringProfile
getTotalCompletedSupplyingTasks
public long getTotalCompletedSupplyingTasks()
- Overrides:
getTotalCompletedSupplyingTasks in class PeerBarteringProfile
getTotalCancelledConsumptionTasks
public long getTotalCancelledConsumptionTasks()
- Overrides:
getTotalCancelledConsumptionTasks in class PeerBarteringProfile
getTotalCancelledSupplyingTasks
public long getTotalCancelledSupplyingTasks()
- Overrides:
getTotalCancelledSupplyingTasks in class PeerBarteringProfile
getRecentlyCompletedConsumptionTasksCount
public long getRecentlyCompletedConsumptionTasksCount()
- Current Consumption completion stride length.
Number of completed Consumption Tasks since
the most recent cancellation of such a Task
(or since the instanciation of PeerRegister if no such Task
was cancelled).
- Overrides:
getRecentlyCompletedConsumptionTasksCount in class PeerBarteringProfile
getRecentlyCompletedSupplyingTasksCount
public long getRecentlyCompletedSupplyingTasksCount()
- Current Supplying completion stride length.
Number of completed Supplying Tasks since
the most recent cancellation of such a Task
(or since the instanciation of PeerRegister if no such Task
was cancelled).
- Overrides:
getRecentlyCompletedSupplyingTasksCount in class PeerBarteringProfile
getRecentlyCancelledConsumptionTasksCount
public long getRecentlyCancelledConsumptionTasksCount()
- Current Consumption cancellation stride length.
Number of cancelled Consumption Tasks since
the most recent completion of such a Task
(or since the instanciation of PeerRegister if no such Task
hasn't already been completed).
- Overrides:
getRecentlyCancelledConsumptionTasksCount in class PeerBarteringProfile
getRecentlyCancelledSupplyingTasksCount
public long getRecentlyCancelledSupplyingTasksCount()
- Current Supplying cancellation stride length.
Number of cancelled Supplying Tasks since
the most recent completion of such a Task
(or since the instanciation of PeerRegister if no such Task
hasn't already been completed).
- Overrides:
getRecentlyCancelledSupplyingTasksCount in class PeerBarteringProfile
getMostRecentConsumptionTaskCancellationTime
public long getMostRecentConsumptionTaskCancellationTime()
- Overrides:
getMostRecentConsumptionTaskCancellationTime in class PeerBarteringProfile
getMostRecentSupplyingTaskCancellationTime
public long getMostRecentSupplyingTaskCancellationTime()
- Overrides:
getMostRecentSupplyingTaskCancellationTime in class PeerBarteringProfile
getMeanConsumptionCompletionStride
public double getMeanConsumptionCompletionStride()
- Overrides:
getMeanConsumptionCompletionStride in class PeerBarteringProfile
getMeanSupplyingCompletionStride
public double getMeanSupplyingCompletionStride()
- Overrides:
getMeanSupplyingCompletionStride in class PeerBarteringProfile
getConsumptionTasksCompletionRatio
public double getConsumptionTasksCompletionRatio()
- Overrides:
getConsumptionTasksCompletionRatio in class PeerBarteringProfile
getConsumptionTasksCancellationRatio
public double getConsumptionTasksCancellationRatio()
- Overrides:
getConsumptionTasksCancellationRatio in class PeerBarteringProfile
getSupplyingTasksCompletionRatio
public double getSupplyingTasksCompletionRatio()
- Overrides:
getSupplyingTasksCompletionRatio in class PeerBarteringProfile
getSupplyingTasksCancellationRatio
public double getSupplyingTasksCancellationRatio()
- Overrides:
getSupplyingTasksCancellationRatio in class PeerBarteringProfile
getConsumptionMTTC
public double getConsumptionMTTC()
- Consumption Tasks Mean Cancellation Notification Time
(MTTC, pronounced m cant).
- Overrides:
getConsumptionMTTC in class PeerBarteringProfile
- Returns:
- Consumption Tasks MTTC,
or Double.MAX_VALUE if no Task has been cancelled yet
getSupplyingMTTC
public double getSupplyingMTTC()
- Supplying Tasks Mean Cancellation Notification Time.
- Overrides:
getSupplyingMTTC in class PeerBarteringProfile
- Returns:
- Supplying Tasks MTTC,
or Double.MAX_VALUE if no Task has been cancelled yet
getConsumptionMTBC
public double getConsumptionMTBC()
- Consumption Tasks Mean Time Between Cancellations.
- Overrides:
getConsumptionMTBC in class PeerBarteringProfile
- Returns:
- Consumption Task MTBC,
or Double.MAX_VALUE if less than two Tasks have been cancelled yet
getSupplyingMTBC
public double getSupplyingMTBC()
- Supplying Tasks Mean Time Between Cancellations.
- Overrides:
getSupplyingMTBC in class PeerBarteringProfile
- Returns:
- Supplying Task MTBC,
or Double.MAX_VALUE if less than two Tasks have been cancelled yet
getMeanConsumptionTaskRuntime
public double getMeanConsumptionTaskRuntime()
- Overrides:
getMeanConsumptionTaskRuntime in class PeerBarteringProfile
getMeanSupplyingTaskRuntime
public double getMeanSupplyingTaskRuntime()
- Overrides:
getMeanSupplyingTaskRuntime in class PeerBarteringProfile
Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.