Lightweight Bartering Grid

lbg.peer.register.negotiation
Class PeerNegotiationProfile

java.lang.Object
  extended by lbg.peer.register.negotiation.PeerNegotiationProfile

public class PeerNegotiationProfile
extends java.lang.Object

Author:
Cyril Briquet

Constructor Summary
PeerNegotiationProfile(Peer managed_peer, ExternalPeerHandle profiled_peer)
           
 
Method Summary
 void accountSentConsumptionGrants(int tasks)
           
 void accountSentSupplyingRequests(int tasks)
           
 void accountUsedConsumptionGrants(int tasks)
           
 int getAndResetReceivedConsumptionGrants()
           
 int getAndResetReceivedSupplyingRequests()
           
 int getReceivedSupplyingRequests()
           
 int getReceviedConsumptionGrants()
           
 long getTotalReceivedConsumptionGrants()
           
 long getTotalReceivedSupplyingRequests()
           
 long getTotalSentConsumptionGrants()
           
 long getTotalSentSupplyingRequests()
           
 long getTotalUsedConsumptionGrants()
           
 void setConsumptionGrantsCount(int tasks)
          Increases Consumption Grants count by specified amount.
 void setReceivedSupplyingRequests(int tasks)
          Increases Supplying Requests count by specified amount.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PeerNegotiationProfile

public PeerNegotiationProfile(Peer managed_peer,
                              ExternalPeerHandle profiled_peer)
                       throws GridException
Throws:
GridException
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

setReceivedSupplyingRequests

public void setReceivedSupplyingRequests(int tasks)
                                  throws GridException
Increases Supplying Requests count by specified amount.

Parameters:
tasks - amount of Supplying Requests by which to increase current Supplying Requests count
Throws:
GridException - if target parameter is illegal

getAndResetReceivedSupplyingRequests

public int getAndResetReceivedSupplyingRequests()
                                         throws GridException
Throws:
GridException

getReceivedSupplyingRequests

public int getReceivedSupplyingRequests()

getTotalReceivedSupplyingRequests

public long getTotalReceivedSupplyingRequests()

accountSentConsumptionGrants

public void accountSentConsumptionGrants(int tasks)
                                  throws GridException
Throws:
GridException

getTotalSentConsumptionGrants

public long getTotalSentConsumptionGrants()

accountSentSupplyingRequests

public void accountSentSupplyingRequests(int tasks)
                                  throws GridException
Throws:
GridException

getTotalSentSupplyingRequests

public long getTotalSentSupplyingRequests()

setConsumptionGrantsCount

public void setConsumptionGrantsCount(int tasks)
                               throws GridException
Increases Consumption Grants count by specified amount.

Parameters:
tasks - amount of Consumption Grants by which to increase current Consumption Grants count
Throws:
GridException - if target parameter is illegal

getAndResetReceivedConsumptionGrants

public int getAndResetReceivedConsumptionGrants()
                                         throws GridException
Throws:
GridException

getReceviedConsumptionGrants

public int getReceviedConsumptionGrants()

getTotalReceivedConsumptionGrants

public long getTotalReceivedConsumptionGrants()

accountUsedConsumptionGrants

public void accountUsedConsumptionGrants(int tasks)
                                  throws GridException
Throws:
GridException

getTotalUsedConsumptionGrants

public long getTotalUsedConsumptionGrants()

Lightweight Bartering Grid

Copyright (c) 2005-2008, Cyril Briquet, parts Xavier Dalem.