|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.glite.wmsui.apij.JobCollection
The JobCollection Class is a container class for Job objects .
A JobCollection has the main purpose of allowing the execution of collective operations on sets of independent jobs. The JobCollection class is just a logical container, and both not yet submitted and already submitted jobs can be inserted in it. A job collection is somehow orthogonal wrt a job cluster being a set of dependent jobs (e.g. all jobs spawned by the same father process). The allowed operations are:
Job
Field Summary | |
protected java.util.Vector |
jobs
The Job in the collection are stored in a vector |
Constructor Summary | |
JobCollection()
Instantiates an empty JobCollection object |
|
JobCollection(Job[] jobs)
Instantiates a JobCollection object from an array of Job |
|
JobCollection(Job job,
int n)
Instantiates a collection with n copies of a job (the Job has to be of JOB__AD type) |
|
JobCollection(java.util.Vector jobs)
Instantiates a JobCollection object from a vector of Job |
Method Summary | |
protected void |
appendJob(int number,
Result result)
Update the Job Result info into the Collection inner result vector. |
java.util.Vector |
cancel()
Cancel the job from the NS |
void |
clear()
Deletes all elements from the collection. |
boolean |
contains(Job job)
Test wheter the specified job is already present in the collection |
boolean |
empty()
Check the size of the collection |
java.util.Vector |
getOutput(java.lang.String dirPath)
Get the output files of the jobs (SYNC) |
java.util.Vector |
getStatus()
Retrieve the status information from the LB |
void |
insert(Job job)
Insert a new Job to the collection |
void |
insertAd(org.glite.jdl.JobAd jobAd)
Insert a new Job (of JobAd type) into the collection |
void |
insertId(JobId jobId)
Insert a new Job (of JobvId type) into the collection |
java.util.Iterator |
jobs()
|
void |
logDefaultValues(boolean set)
Decide whether to log or not some UI default values such as: UI node name information in UserTags attribute |
Result |
notify(int[] states,
int timeout)
Retrieves the status of the first Jobs of the collection once it enters one of the specified status code |
void |
remove(Job job)
Remove a specified Job from the collection Delete the specified job from the collection (if the id has been set) Delete the last occurrence of the job from the collection (if the ad has not been set) |
void |
run()
|
void |
setCredPath(java.io.File cp)
Set a different Proxy certificate from the default one |
void |
setLoggerLevel(int level)
Set the NS verbosity level |
void |
setMaxThreadNumber(int maxThread)
This method is used to override the MAX_THREAD_NUMBER macro variable |
int |
size()
|
java.util.Vector |
submit(Url ns,
java.util.Vector lbs,
java.lang.String ceId)
Submit method |
void |
unsetCredPath()
Set the Proxy certificate as default |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Vector jobs
Constructor Detail |
public JobCollection()
public JobCollection(Job job, int n) throws JobCollectionException
job
- the source Job (of JOB_TYPE) instanciesn
- the number of copies to be filled in the collection
JobCollectionException
- The job is not of JOB__AD typepublic JobCollection(java.util.Vector jobs) throws JobCollectionException, java.lang.NoSuchFieldException
jobs
- the vector of Job instances that have to be inserted
JobCollectionException
- Unable to add duplicate JobId
java.lang.NoSuchFieldException
- One of the Job is of JOB_NONE typepublic JobCollection(Job[] jobs) throws JobCollectionException, java.lang.NoSuchFieldException
jobs
- the array of Job instances that have to be inserted
JobCollectionException
- Unable to add duplicate JobId
java.lang.NoSuchFieldException
- One of the Job is of JOB_NONE typeMethod Detail |
public boolean empty()
public int size()
public boolean contains(Job job)
public void insertId(JobId jobId) throws JobCollectionException
jobId
- the JobId instance that has to be inserted
JobCollectionException
- Unable to add duplicate JobIdpublic void insertAd(org.glite.jdl.JobAd jobAd)
jobAd
- the JobAd instance that has to be inserted
JobCollectionException
- Unable to insert the Jobpublic void insert(Job job) throws JobCollectionException, java.lang.NoSuchFieldException
job
- tht Job instance that has to be inserted
JobCollectionException
- Unable to add duplicate JobId
java.lang.NoSuchFieldException
- If the Job is of JOB_NONE typepublic void remove(Job job) throws java.lang.NoSuchFieldException
job
- the Job that has to be removed
java.lang.NoSuchFieldException
- Unable to remove the Jobpublic void clear()
public void setLoggerLevel(int level)
level
- minimum (no verbosity) level = 0. Maximum (full verbosity) = 6public void logDefaultValues(boolean set)
set
- if set to true the UI will automatically log its default values, otherwise notpublic void setCredPath(java.io.File cp) throws org.globus.gsi.GlobusCredentialException, java.io.IOException
cp
- The full path of the proxy certificate file to be set
java.io.IOException
- Unable to find-load-read the specified path
org.globus.gsi.GlobusCredentialException
- Unable to get the specified proxy certificatepublic void unsetCredPath() throws org.globus.gsi.GlobusCredentialException, java.io.IOException
java.io.IOException
- Unable to find-load-read the default proxy file
org.globus.gsi.GlobusCredentialException
- Unable to get the default proxy certificatepublic java.util.Iterator jobs()
public java.util.Vector submit(Url ns, java.util.Vector lbs, java.lang.String ceId) throws java.lang.NoSuchFieldException, JobCollectionException, java.lang.InterruptedException, org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException
ns
- The Network Server addresslbs
- a vector of Urls containing all the logging and bookkeeping addressesceId
- The Computing Element Identificator where to perform the job
org.globus.gsi.GlobusCredentialException
- Unable to get proxy certificate information
FileNotFoundException
- - Unable to find proxy certificate file.
JobCollectionException
- Some error occurred while executing the operation
java.lang.InterruptedException
- An Error occurred while waiting for a thread to finish
java.lang.NoSuchFieldException
- if the LB vector is emptypublic java.util.Vector cancel() throws JobCollectionException, java.lang.InterruptedException, org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException
JobCollectionException
- Some error occurred while executing the operation
java.lang.InterruptedException
- An Error occurred while waiting for a thread to finish
org.globus.gsi.GlobusCredentialException
- Unable to get proxy certificate information
FileNotFoundException
- - Unable to find proxy certificate file.public Result notify(int[] states, int timeout) throws JobCollectionException, java.lang.InterruptedException, org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException, java.lang.NoSuchFieldException
states
- an array of JobStatus status codestimeout
- seconds the method has to wait for notification. After that period the methods returns anyway. If 0 specified it hangs untill notify arrives
java.lang.UnsupportedOperationException
- The Operation required is not allowed for the Job
FileNotFoundException
- Unable to find certificates files
gsi.GlobusCredentialException
- error while checking certificates validity
JobCollectionException
java.lang.InterruptedException
org.globus.gsi.GlobusCredentialException
java.lang.NoSuchFieldException
Result.TIMEOUT_REACHED
public java.util.Vector getStatus() throws JobCollectionException, java.lang.InterruptedException, org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException
JobCollectionException
- Some error occurred while executing the operation
java.lang.InterruptedException
- An Error occurred while waiting for a thread to finish
org.globus.gsi.GlobusCredentialException
- Unable to get proxy certificate information
FileNotFoundException
- - Unable to find proxy certificate file.public java.util.Vector getOutput(java.lang.String dirPath) throws JobCollectionException, java.lang.InterruptedException, org.globus.gsi.GlobusCredentialException, java.io.FileNotFoundException
dirPath
- the path where to retrieve the OutputSandbox files
JobCollectionException
- Some error occurred while executing the operation
java.lang.InterruptedException
- An Error occurred while waiting for a thread to finish
org.globus.gsi.GlobusCredentialException
- Unable to get proxy certificate information
FileNotFoundException
- - Unable to find proxy certificate file.public void setMaxThreadNumber(int maxThread)
maxThread
- the max number or simultaneous threads allowed (unless the -DWITHOUT_THREAD option is specified while compiling)protected void appendJob(int number, Result result)
number
- the number of the job insied the collectionresult
- the result of thte required operationpublic void run()
run
in interface java.lang.Runnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |