eu.xtreemos.xosd.srdsaccess.jobDirectory
Interface IJobDirectory


public interface IJobDirectory

The interface that represents the access from Job Directory to Distributed Directory Service (ADS/RSS, WP3.2).

Author:
matej.artac@xlab.si, marta.garcia@bsc.es

Nested Class Summary
static class IJobDirectory.Attribute
           
 
Method Summary
 int clear()
          Remove the job information of all jobs, effectively emptying the job directory.
 int getAttribute(java.lang.String JobId, java.lang.String attributeName, IJobDirectoryListener listener)
           
 int getJobContactPoint(java.lang.String jobID, IJobDirectoryListener listener)
          Invoke a query for the contact point of a job currently in the directory.
 int getJobIDs(IJobDirectory.Attribute attribute, IJobDirectoryListener listener)
          Get the keys that match the pair attribute name and value
 int modifyJobContactPoint(java.lang.String jobID, CommunicationAddress newContactPoint, IJobDirectoryListener listener)
          Change a contact point of a job already in the directory.
 int putJob(java.lang.String jobID, CommunicationAddress contactPoint, java.lang.String userID, IJobDirectoryListener listener)
          Put a job information into the directory.
 int removeJob(java.lang.String jobID, IJobDirectoryListener listener)
          Remove a job's information from the directory.
 int setAttribute(java.lang.String jobID, IJobDirectory.Attribute attribute)
          Adds an attribute of a job or updates it in case the attribute was already set
 

Method Detail

putJob

int putJob(java.lang.String jobID,
           CommunicationAddress contactPoint,
           java.lang.String userID,
           IJobDirectoryListener listener)
Put a job information into the directory.

Parameters:
jobID - The job's identification is the key in the DHT.
contactPoint - The node where the JobMng of the job is running at.
userID - The user that ows the job
listener - TODO: what can be the success notification here?
Returns:

modifyJobContactPoint

int modifyJobContactPoint(java.lang.String jobID,
                          CommunicationAddress newContactPoint,
                          IJobDirectoryListener listener)
Change a contact point of a job already in the directory.

Parameters:
jobID - The key of the job we would like to change the contact point of.
newContactPoint - The new value of the job's contact point
listener - TODO: what can be the success notification here?
Returns:

setAttribute

int setAttribute(java.lang.String jobID,
                 IJobDirectory.Attribute attribute)
Adds an attribute of a job or updates it in case the attribute was already set

Parameters:
jobID - The key of the job already in the directory
attribute - that is a pair of name and value, to be set
Returns:

removeJob

int removeJob(java.lang.String jobID,
              IJobDirectoryListener listener)
Remove a job's information from the directory.

Parameters:
jobID - The key of the job we would like to remove.
listener - TODO: what can be the success notification here?
Returns:

getJobContactPoint

int getJobContactPoint(java.lang.String jobID,
                       IJobDirectoryListener listener)
Invoke a query for the contact point of a job currently in the directory.

Parameters:
jobID - The key of the job that we are querying about.
listener - The listener to receive the results of the query.
Returns:

getJobIDs

int getJobIDs(IJobDirectory.Attribute attribute,
              IJobDirectoryListener listener)
Get the keys that match the pair attribute name and value

Parameters:
attribute - pair name, value we want to get the matching keys
listener - The listener to receive the results of the query.
Returns:

getAttribute

int getAttribute(java.lang.String JobId,
                 java.lang.String attributeName,
                 IJobDirectoryListener listener)
Parameters:
JobId - The key of the job that we are querying about.
attributeName - we want to obtain the value of.
listener - The listener to receive the results of the query.
Returns:

clear

int clear()
Remove the job information of all jobs, effectively emptying the job directory. TODO: do we need a listener?

Returns: