Main Page   Class Hierarchy   Compound List   File List   Compound Members  

JobCollection Class Reference

The JobCollection Class is a container class for Job objects . Container class for Job objects. More...

List of all members.

Public Methods

Constructors/Destructor
virtual ~JobCollection ()
 Destructor.

 JobCollection ()
 Instantiates an empty JobCollection object.

 JobCollection (const Job &job, unsigned int n)
 Instantiates a collection with n copies of a job (the Job has to be of JOB__AD type). More...

 JobCollection (const std::vector< Job > &jobs)
 Instantiates a JobCollection object from a vector of Job. More...

Jobs insertion/remotion handling
bool empty ()
 Check the size of the collection. More...

unsigned int size ()
void insert (const Job &job)
 Insert a new Job to the collection. More...

void remove (const 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). More...

void clear ()
 Deletes all elements from the collection.

void setLoggerLevel (int level)
 Se the verbosity level for NS debug default value = 0 (no verbosity) max value = 6 (dreadful verbosity, print screen). More...

void setCredPath (const std::string cp)
 Set a different Proxy certificate from the default one. More...

void unsetCredPath ()
 Set the Proxy certificate as default.

void setMaxThreadNumber (unsigned int maxThread)
 This method is used to override the MAX_THREAD_NUMBER macro variable. More...

Iteration action
std::vector< Job >::iterator begin ()
std::vector< Job >::iterator end ()
Operation
CollectionResult submit (const std::string &ns_host, int ns_port, std::vector< std::pair< std::string, int > > lbAddrs, const std::string &ce_id="")
 Submit method. More...

CollectionResult cancel ()
 Cancel the job from the NS Cancel all the jobs belonging to the collection. More...

CollectionResult getStatus ()
 Retrieve the status information from the LB. More...

CollectionResult getOutput (const std::string &dir_path)
 Get the output files of the jobs. More...


Detailed Description

The JobCollection Class is a container class for Job objects . 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:

Version:
0.1
Date:
15 April 2002
Author:
Alessandro Maraschini <alessandro.maraschini@datamat.it>


Constructor & Destructor Documentation

JobCollection const Job   job,
unsigned int    n
 

Instantiates a collection with n copies of a job (the Job has to be of JOB__AD type).

Parameters:
job  the source Job (of JOB_TYPE) instancies
n  the number of copies to be filled in the collection

JobCollection const std::vector< Job > &    jobs
 

Instantiates a JobCollection object from a vector of Job.

Parameters:
jobs  the vector of Job instances that have to be inserted


Member Function Documentation

std::vector<Job>::iterator begin   [inline]
 

Returns:
an iterator pointing to the beginning of the collection

CollectionResult cancel  
 

Cancel the job from the NS Cancel all the jobs belonging to the collection.

A job can be cancelled only when it is not yet finished

Returns:
a JobCollection::CollectionResult instance*

bool empty   [inline]
 

Check the size of the collection.

Returns:
True if the collection's size is 0

std::vector<Job>::iterator end   [inline]
 

Returns:
an iterator pointing to the end of the collection.

CollectionResult getOutput const std::string &    dir_path
 

Get the output files of the jobs.

Parameters:
dir_path  the path where to retrieve the OutputSandbox files
Returns:
a JobCollection::CollectionResult instance

CollectionResult getStatus  
 

Retrieve the status information from the LB.

Parameters:
statusVector  A vector that will be filled with LB status information for each job
Returns:
a CollectionResult instance

void insert const Job   job
 

Insert a new Job to the collection.

Parameters:
job  tht Job instance that has to be inserted

void remove const 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).

Parameters:
job  the Job that has to be removed

void setCredPath const std::string    cp
 

Set a different Proxy certificate from the default one.

Parameters:
cp  The full path of the proxy certificate file to be set

void setLoggerLevel int    level
 

Se the verbosity level for NS debug default value = 0 (no verbosity) max value = 6 (dreadful verbosity, print screen).

Parameters:
level  NS verbosity (0-6)

void setMaxThreadNumber unsigned int    maxThread [inline]
 

This method is used to override the MAX_THREAD_NUMBER macro variable.

Parameters:
maxThread  the max number or simultaneous threads allowed (unless the -DWITHOUT_THREAD option is specified while compiling)

unsigned int size   [inline]
 

Returns:
the lenght of the inserted Jobs

CollectionResult submit const std::string &    ns_host,
int    ns_port,
std::vector< std::pair< std::string, int > >    lbAddrs,
const std::string &    ce_id = ""
 

Submit method.

Parameters:
ns_host  The Network Server host name
ns_port  the Network Server port value
lbAddrs  a vector containing all the LB knonw by the user. The LB for each job is selected randomly
ce_id  The Computing Element Identificator where to perform the job
Returns:
a JobCollection::CollectionResult instance


The documentation for this class was generated from the following file:
Generated on Fri May 14 14:19:39 2004 for USERINTERFACE C++ API by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002