org.ourgrid.mygrid.scheduler
Class BlackListEntry

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

public class BlackListEntry
extends java.lang.Object

Entity used to associate the GumID and a certain number of fails tha can occurs while executing a request.


Constructor Summary
BlackListEntry(GumID gumid, int numberOfFailures)
          Constructs a new BlackListEntry.
 
Method Summary
 boolean equals(java.lang.Object obj)
           
 GumID getGumID()
           
 int getNumberOfRemainingFailedExecutions()
           
 java.util.Set<java.lang.Integer> getTaskIDs()
           
 int hashCode()
           
 boolean taskFail(int taskID)
          Add a task to this Gum black list.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BlackListEntry

public BlackListEntry(GumID gumid,
                      int numberOfFailures)
Constructs a new BlackListEntry.

Parameters:
gumid - The GumID represented by this entry
numberOfFailures - The remaining number of fails to the Gum enter in the black list
Method Detail

getGumID

public GumID getGumID()
Returns:
The GumID represented by this entry.

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

taskFail

public boolean taskFail(int taskID)
Add a task to this Gum black list.

Parameters:
taskID - The task to be added
Returns:
True if the task is new in the task list, false otherwise.

getNumberOfRemainingFailedExecutions

public int getNumberOfRemainingFailedExecutions()

getTaskIDs

public java.util.Set<java.lang.Integer> getTaskIDs()