Lightweight Bartering Grid

lbg.peer.register
Class PeerProfile

java.lang.Object
  extended by lbg.peer.register.PeerProfile
All Implemented Interfaces:
java.lang.Comparable<PeerProfile>
Direct Known Subclasses:
TestPeerProfile

public class PeerProfile
extends java.lang.Object
implements java.lang.Comparable<PeerProfile>

Author:
Cyril Briquet

Constructor Summary
PeerProfile(Peer managed_peer, ExternalPeerHandle profiled_peer, BarteringAccountantPolicy accountant)
           
 
Method Summary
 int compareTo(PeerProfile other)
           
 TaskSchedulingContext createConsumptionTaskSchedulingContext(Task t)
           
 TaskSchedulingContext createSupplyingTaskSchedulingContext(Task t)
           
 int decreaseRunningJobsCount()
           
 int decreaseWaitingJobsCount()
           
 boolean equals(java.lang.Object obj)
           
 PeerBarteringProfile getBarteringProfile()
           
 ExternalPeerHandle getHandle()
           
 PeerInteractionsDataBase getInteractionsDataBase()
           
 PeerNegotiationProfile getNegotiationProfile()
           
 int getRunningJobsCount()
           
 int getWaitingJobsCount()
           
 int hashCode()
           
 java.lang.String id()
           
 int increaseRunningJobsCount()
           
 int increaseWaitingJobsCount()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PeerProfile

public PeerProfile(Peer managed_peer,
                   ExternalPeerHandle profiled_peer,
                   BarteringAccountantPolicy accountant)
            throws GridException
Throws:
GridException
Method Detail

toString

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

compareTo

public int compareTo(PeerProfile other)
Specified by:
compareTo in interface java.lang.Comparable<PeerProfile>

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

id

public java.lang.String id()

getHandle

public ExternalPeerHandle getHandle()

getNegotiationProfile

public PeerNegotiationProfile getNegotiationProfile()

getBarteringProfile

public PeerBarteringProfile getBarteringProfile()

getInteractionsDataBase

public PeerInteractionsDataBase getInteractionsDataBase()
                                                 throws GridException
Throws:
GridException

getWaitingJobsCount

public int getWaitingJobsCount()
                        throws GridException
Throws:
GridException

increaseWaitingJobsCount

public int increaseWaitingJobsCount()
                             throws GridException
Throws:
GridException

decreaseWaitingJobsCount

public int decreaseWaitingJobsCount()
                             throws GridException
Throws:
GridException

getRunningJobsCount

public int getRunningJobsCount()
                        throws GridException
Throws:
GridException

increaseRunningJobsCount

public int increaseRunningJobsCount()
                             throws GridException
Throws:
GridException

decreaseRunningJobsCount

public int decreaseRunningJobsCount()
                             throws GridException
Throws:
GridException

createConsumptionTaskSchedulingContext

public TaskSchedulingContext createConsumptionTaskSchedulingContext(Task t)
                                                             throws GridException
Throws:
GridException

createSupplyingTaskSchedulingContext

public TaskSchedulingContext createSupplyingTaskSchedulingContext(Task t)
                                                           throws GridException
Throws:
GridException

Lightweight Bartering Grid

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