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.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

Field Summary

Fields inherited from class lbg.peer.register.bartering.PeerBarteringProfile
`MAX_STORED_INTERACTIONS`

Constructor Summary
`TestPeerBarteringProfile(java.lang.String profiled_peer_id, java.lang.String managed_peer_id)`

Method Summary
`void` | `accountConsumptionCancellation(Task t, long xstart_time)`
`double` | `accountConsumptionCompletion(Task t, long xstart_time, long consumed_external_power)`
`void` | `accountSupplyingCancellation(Task t, long xstart_time)`
`double` | `accountSupplyingCompletion(Task t, long xstart_time, long supplied_local_power)`
`BarteringAccountantPolicy` | `getAccountant()`
`double` | `getConsumptionMTBC()` Consumption Tasks Mean Time Between Cancellations.
`double` | `getConsumptionMTTC()` Consumption Tasks Mean Cancellation Notification Time (MTTC, pronounced m cant).
`double` | `getConsumptionTasksCancellationRatio()`
`double` | `getConsumptionTasksCompletionRatio()`
`double` | `getFavorsBalance()` Favors balance of managed Peer with target Peer (guaranteed to be nonnegative).
`double` | `getMeanConsumptionCompletionStride()`
`double` | `getMeanConsumptionTaskRuntime()`
`double` | `getMeanSupplyingCompletionStride()`
`double` | `getMeanSupplyingTaskRuntime()`
`long` | `getMostRecentConsumptionTaskCancellationTime()`
`long` | `getMostRecentSupplyingTaskCancellationTime()`
`long` | `getRecentlyCancelledConsumptionTasksCount()` Current Consumption cancellation stride length.
`long` | `getRecentlyCancelledSupplyingTasksCount()` Current Supplying cancellation stride length.
`long` | `getRecentlyCompletedConsumptionTasksCount()` Current Consumption completion stride length.
`long` | `getRecentlyCompletedSupplyingTasksCount()` Current Supplying completion stride length.
`double` | `getSupplyingMTBC()` Supplying Tasks Mean Time Between Cancellations.
`double` | `getSupplyingMTTC()` Supplying Tasks Mean Cancellation Notification Time.
`double` | `getSupplyingTasksCancellationRatio()`
`double` | `getSupplyingTasksCompletionRatio()`
`long` | `getTotalCancelledConsumptionTasks()`
`long` | `getTotalCancelledSupplyingTasks()`
`long` | `getTotalCompletedConsumptionTasks()`
`long` | `getTotalCompletedSupplyingTasks()`
`long` | `getTotalConsumedExternalPower()` Deprecated.
`double` | `getTotalConsumedFavors()`
`double` | `getTotalSuppliedFavors()`
`long` | `getTotalSuppliedLocalPower()` Deprecated.
`void` | `setAccountant(BarteringAccountantPolicy accountant)`
`java.lang.String` | `toString()`

Methods inherited from class lbg.peer.register.bartering.PeerBarteringProfile
`estimateSupplyingTaskRuntime, getConsumptionMC4`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TestPeerBarteringProfile

    public TestPeerBarteringProfile(java.lang.String profiled_peer_id,
                                    java.lang.String managed_peer_id)
                             throws GridException

Throws:
  `GridException`

Method Detail

### 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`

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.