org.gridbus.broker.server
Class UserExperimentKey

java.lang.Object
  extended by org.gridbus.broker.server.UserExperimentKey
All Implemented Interfaces:
java.io.Serializable, FarmingEngineKey

public class UserExperimentKey
extends java.lang.Object
implements FarmingEngineKey

Provides a unique key for a GridbusFarmingEngine instance by using the username and experiment name (as String-s) as the primary key.

See Also:
Serialized Form

Constructor Summary
UserExperimentKey(java.lang.String user, java.lang.String experiment)
          Create a unique identifer based on user and experiment name
 
Method Summary
 boolean equals(java.lang.Object o)
          Objects are equal if user and experiment name match exactly.
 java.lang.String getExperiment()
           
 int hashCode()
           
 boolean isUser(java.lang.String user)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserExperimentKey

public UserExperimentKey(java.lang.String user,
                         java.lang.String experiment)
Create a unique identifer based on user and experiment name

Parameters:
user -
experiment -
Method Detail

isUser

public boolean isUser(java.lang.String user)
Parameters:
user -
Returns:
Returns true if the specified user 'owns' this key

getExperiment

public java.lang.String getExperiment()
Returns:
Returns Experiment name

equals

public boolean equals(java.lang.Object o)
Objects are equal if user and experiment name match exactly.

Overrides:
equals in class java.lang.Object
Parameters:
o -
Returns:

hashCode

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

toString

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