org.ourgrid.peer.manager.request
Class RequestEntry

java.lang.Object
  extended by org.ourgrid.peer.manager.request.RequestEntry

public class RequestEntry
extends java.lang.Object

Represents a request made by some consumer. It is used by the peer to store information about a request. The instances of RequestEntry are managed by the RequestManager

See Also:
RequestManager

Nested Class Summary
static class RequestEntry.RequestStatus
           
 
Constructor Summary
RequestEntry(RequestSpec requestSpec)
          Default constructor.
 
Method Summary
 void disposeOfGum(GumID gumID)
           
 java.util.Collection<GumID> getGums()
           
 java.util.Collection<GumID> getGums(AllocationEntry.GumSource source)
           
 int getNeededGums()
           
 RequestSpec getSpec()
           
 RequestEntry.RequestStatus getStatus()
           
 java.util.Set<GumID> getUnwantedGums()
           
 void hereIsGum(GumID gumID)
           
 boolean isGumUnwanted(GumID gumID)
           
 boolean isPaused()
           
 boolean needMoreGums()
           
 int numberOfAllocatedGums()
           
 void pauseRequest()
           
 void resumeRequest()
           
 void setStatus(RequestEntry.RequestStatus status)
           
 java.lang.String toString()
           
 void unwantedGum(GumID gumID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestEntry

public RequestEntry(RequestSpec requestSpec)
Default constructor.

Parameters:
requestSpec - the request specification provided by the consumer
Method Detail

getSpec

public RequestSpec getSpec()

getGums

public java.util.Collection<GumID> getGums()

getGums

public java.util.Collection<GumID> getGums(AllocationEntry.GumSource source)

unwantedGum

public void unwantedGum(GumID gumID)

isGumUnwanted

public boolean isGumUnwanted(GumID gumID)

getUnwantedGums

public java.util.Set<GumID> getUnwantedGums()

numberOfAllocatedGums

public int numberOfAllocatedGums()

getStatus

public RequestEntry.RequestStatus getStatus()

setStatus

public void setStatus(RequestEntry.RequestStatus status)

isPaused

public boolean isPaused()

getNeededGums

public int getNeededGums()

needMoreGums

public boolean needMoreGums()

disposeOfGum

public void disposeOfGum(GumID gumID)

hereIsGum

public void hereIsGum(GumID gumID)

pauseRequest

public void pauseRequest()

resumeRequest

public void resumeRequest()

toString

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