org.ourgrid.mygrid.scheduler
Class JobRequestEntry

java.lang.Object
  extended by org.ourgrid.mygrid.scheduler.JobRequestEntry

public class JobRequestEntry
extends java.lang.Object

This class was created to keep a pair of Job and Request used to cancel requests and simplify as well as downsize the code of EBGridManager


Constructor Summary
JobRequestEntry(int jobId, long requestID)
          Constructs a new Pair of Job and Request.
 
Method Summary
 void addPeer(Gump gump)
          Adds a new pair of Request (by id) and respective GuMP.
 void cancelRequests()
          Cancels (calls noMoreGMs) the requests made for the Job.
 java.util.Collection<Gump> getPeers()
           
 long getRequestID()
           
 boolean isPaused()
           
 void pauseRequest()
           
 void resumeRequest()
           
 java.lang.String toString()
          Returns a String with Job Id following toString of the reqs Map.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JobRequestEntry

public JobRequestEntry(int jobId,
                       long requestID)
Constructs a new Pair of Job and Request.

Parameters:
jobId - The Job to which the request was made.
Method Detail

addPeer

public void addPeer(Gump gump)
Adds a new pair of Request (by id) and respective GuMP.

Parameters:
gump - The Grid Machine Provider to which the request was made.

cancelRequests

public void cancelRequests()
Cancels (calls noMoreGMs) the requests made for the Job.


toString

public java.lang.String toString()
Returns a String with Job Id following toString of the reqs Map.

Overrides:
toString in class java.lang.Object
Returns:
Job Id + Map of req and gmps.

getRequestID

public long getRequestID()

getPeers

public java.util.Collection<Gump> getPeers()

pauseRequest

public void pauseRequest()

resumeRequest

public void resumeRequest()

isPaused

public boolean isPaused()