eu.xtreemos.xati.API
Class XJobMng

java.lang.Object
  extended by eu.xtreemos.xati.API.XJobMng

public class XJobMng
extends java.lang.Object

Author:
gregor.pipan@xlab.si

Field Summary
static java.lang.String servicename
           
 
Constructor Summary
XJobMng()
           
 
Method Summary
static void addDependence(java.lang.String __FromJobId, java.lang.String __toJobId, java.lang.String __TAG, java.security.cert.X509Certificate __userCtx)
          This function adds a new job dependence.
static java.lang.Integer addJobMetric(java.lang.String __jobId, eu.xtreemos.xosd.utilities.metrics.MetricsDesc __metric, java.security.cert.X509Certificate __userCtx)
          Adds a new user defined metric to the job.
static void chgUID(java.lang.String __jobId, java.security.cert.X509Certificate __oldUserCtx, java.security.cert.X509Certificate __newUserCtx)
          Changes the UID associated to a jobId
static java.lang.String createJob(java.lang.String __jsdlFile, java.lang.Boolean __startJob, java.lang.String __reservationID, java.security.cert.X509Certificate __userCtx)
          Creates a job in the AEM based on the JSDL description.
static java.lang.Integer createProcess(java.lang.String __jobId, java.lang.String __JSDL, java.lang.String __reservationId, CommunicationAddress __resource, java.security.cert.X509Certificate __userCtx)
          Creates a new Process inside the specified JobID In order to increase performance, user can specify the ReservationID.
static void deleteDependence(java.lang.String __FromJobId, java.lang.String __ToJobId, java.lang.String __TAG, java.security.cert.X509Certificate __userCtx)
          Deletes an existing dependence between two specific jobs
static void exitJob(java.lang.String __jobId, java.lang.Integer __exitValue, java.security.cert.X509Certificate __userCtx)
          The job identified by the jobId is finished immediately (all the processes of the job) with the exit code provided.
static java.lang.String getJobId(CommunicationAddress __resourceId, java.lang.Integer __pid, java.security.cert.X509Certificate __userCtx)
          Returns the jobID corresponding to a
static java.lang.String getJobInfo(java.lang.String __jobId, java.lang.Integer __flags, java.lang.Integer __infoLevel, java.util.ArrayList<java.lang.String> __metricsList, java.security.cert.X509Certificate __userCtx)
          TODO: To be eventually deprecated.
static java.util.ArrayList<eu.xtreemos.xosd.utilities.metrics.MetricsDesc> getJobMetrics(java.lang.String __jobId, java.security.cert.X509Certificate __userCtx)
          Returns the list of available metrics for a specific job, both system and user defined.
static java.lang.String getJobsInfo(java.util.ArrayList<java.lang.String> __jobIds, java.lang.Integer __flags, java.lang.Integer __infoLevel, java.util.ArrayList<java.lang.String> __metrics, java.security.cert.X509Certificate __userCtx)
          Returns the monitoring information of the requested jobs.
static java.util.ArrayList<java.lang.String> getJobsUser(java.lang.String __userId, java.security.cert.X509Certificate __userCtx)
          Returns all the jobIDs of the jobs belonging to the given user
static java.util.ArrayList<java.lang.String> getListOfDependences(java.lang.String __jobID, java.lang.String __tag, java.lang.Integer __levels, java.lang.Integer __direction, java.security.cert.X509Certificate __userCtx)
          Returns the list of jobs that have a dependence FROM jobID or TO jobID.
static void identifyJobManagers(java.util.ArrayList<java.lang.String> __dependentJobs, java.lang.String __initialJobId, java.lang.String __strategy, java.lang.String __options, java.lang.String __mode, java.security.cert.X509Certificate __cert)
          identify job manager address of each job
static void jobControl(java.lang.String __jobId, java.lang.Integer __ctrOp, java.security.cert.X509Certificate __userCtx)
          Apply the operation Control to the specific jobId
static void jobMonitoringControl(java.lang.String __jobId, java.lang.Integer __op, java.lang.String __level, java.security.cert.X509Certificate __userCtx)
          Update the characteristics of the monitorization of a job.
static java.lang.Integer jobWait(java.lang.String __jobId, java.security.cert.X509Certificate __userCtx)
          Blocks the calling process until the job indicated finishes
static void lockCheckpoint(java.lang.String __jobId, java.lang.String __initialJobId, java.security.cert.X509Certificate __userCert, CommunicationAddress __jobCpAddr, CommunicationAddress __superJobCpAddr, java.lang.String __strategy, java.lang.String __options, java.lang.String __mode, java.util.ArrayList<java.lang.String> __dependentJobs)
          lock a checkpoint action - private member jobslist needed piggyback jsdl file and executable name
static void recreateJob(java.lang.String __jobId, java.lang.String __initialJobId, java.lang.String __jsdlFileContent, java.lang.String __checkpointVersion, CommunicationAddress __superJobCpAddr, java.util.ArrayList<CommunicationAddress> __jobResourceList, java.security.cert.X509Certificate __userCert)
          set up structures that represent a job in AEM at restart
static java.lang.Integer removeJobMetric(java.lang.String __jobId, java.lang.String __metricName, java.security.cert.X509Certificate __userCtx)
          Removes a user defined metric from the job.
static java.lang.Integer runJob(java.lang.String __jobId, java.lang.String __reservationID, java.security.cert.X509Certificate __userCtx)
          Starts the scheduling process of a previously created job.
static java.lang.Integer runJobRes(java.lang.String __jobId, java.lang.String __reservationID, CommunicationAddress __resourceID, java.security.cert.X509Certificate __userCtx)
          Starts the scheduling process of a previously created job.
static void sendEvent(java.lang.String __jobId, java.lang.Integer __signal, java.lang.Integer __operation, java.util.ArrayList<java.lang.String> __list, java.security.cert.X509Certificate __userCtx)
          Sends an event to a job
static java.lang.Integer setMetricValue(java.lang.String __jobId, java.lang.String __metricName, CommunicationAddress __resourceID, java.lang.Integer __pid, java.lang.String __value, java.security.cert.X509Certificate __userCtx)
          Sets the value of a Metric.
static java.lang.Integer setMonitorBuffering(java.lang.String __jobId, java.lang.String __metricName, CommunicationAddress __resourceID, java.lang.Integer __pid, java.lang.Integer __flags, java.security.cert.X509Certificate __userCtx)
          Switches on and off buffering for the specified metric.
static void unlockCheckpoint(java.lang.String __jobId)
           
static void unlockRestart(java.lang.String __jobId)
           
static void updateJobHints(java.lang.String __jobId, java.lang.Integer __operation, java.lang.String __requirements, java.lang.Boolean __wait, java.security.cert.X509Certificate __userCtx)
          Modifies the hints passed in createJob function
static void updateJobMetric(java.lang.String __jobId, eu.xtreemos.xosd.utilities.metrics.MetricsDesc __metric, java.security.cert.X509Certificate __userCtx)
          Not defined yet
static void updateJobRequirements(java.lang.String __jobId, java.lang.Integer __operation, java.lang.String __requirements, java.lang.Boolean __wait, java.security.cert.X509Certificate __userCtx)
          Modifies the requirements passed in createJob function.
static void waitForEvent(java.lang.String __jobId, java.lang.Integer __event, java.security.cert.X509Certificate __userCtx)
          Blocks the calling process until "event" is received.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

servicename

public static java.lang.String servicename
Constructor Detail

XJobMng

public XJobMng()
Method Detail

createJob

public static java.lang.String createJob(java.lang.String __jsdlFile,
                                         java.lang.Boolean __startJob,
                                         java.lang.String __reservationID,
                                         java.security.cert.X509Certificate __userCtx)
                                  throws java.lang.Exception
Creates a job in the AEM based on the JSDL description. The job can be automatically scheduled or just created, depending on the value of startJob. If a reservationId is provided, the job will be scheduled on that reservation. Otherwise, a negotiation/reservation process will be started when the job will be scheduled based on resource requirements and scheduling hints. If calls to VOPS are enabled, policy enforcement gets into the picture. XOSDCONSOLE annotation denotes that this method becomes a part of XConsole project and therefore be available to user usage and scripts.

Parameters:
jsdlFile - is the job description of the job to be created in JSDL format (content not path to jsdl file)
startJob - true if we want to run job now, false just to create it without running
reservationID - The previously created reservation were the job will run
userCtx - the user certificate.
Returns:
the JobId of the new job created TODO: Use the reservationId and the user certificate
Throws:
java.lang.Exception

runJob

public static java.lang.Integer runJob(java.lang.String __jobId,
                                       java.lang.String __reservationID,
                                       java.security.cert.X509Certificate __userCtx)
                                throws java.lang.Exception
Starts the scheduling process of a previously created job. JobId must be a valid jobId in the system. If a resevationID is provided the job will be scheduled on that reservation. Otherwise, a negotiation/reservation process will be started.

Parameters:
jobId - of the job to be started
reservationID - The previously created reservation were the job will run
userCtx - the user certificate.
Returns:
an Integer to be determined TODO: Use the reservationId and the user certificate
Throws:
java.lang.Exception

runJobRes

public static java.lang.Integer runJobRes(java.lang.String __jobId,
                                          java.lang.String __reservationID,
                                          CommunicationAddress __resourceID,
                                          java.security.cert.X509Certificate __userCtx)
                                   throws java.lang.Exception
Starts the scheduling process of a previously created job. JobId must be a valid jobId in the system. It will get a ResourceID, (that should be valid in the ReservationID provided), and run the job on those resource.

Parameters:
jobId - of the job to be started
reservationID - The previously created reservation were the job will run
resourceID - of the resource that will run the job (if possible)
userCtx - the user certificate.
Returns:
an Integer to be determined TODO: Use the reservationId and the user certificate
Throws:
java.lang.Exception

jobControl

public static void jobControl(java.lang.String __jobId,
                              java.lang.Integer __ctrOp,
                              java.security.cert.X509Certificate __userCtx)
                       throws java.lang.Exception
Apply the operation Control to the specific jobId

Parameters:
jobId - of the job to apply the operation
ctrOp - possible values: 0: SUSPENDJOB 1: RESUMEJOB 2: CANCEL JOB
userCtx - the user certificate
Throws:
java.lang.Exception

exitJob

public static void exitJob(java.lang.String __jobId,
                           java.lang.Integer __exitValue,
                           java.security.cert.X509Certificate __userCtx)
                    throws java.lang.Exception
The job identified by the jobId is finished immediately (all the processes of the job) with the exit code provided. If the process calling exitJob is part of the job this function never returns.

Parameters:
jobId - identifying the job to exit
exitValue - the exit code the job will finish with
userCtx - the user certificate
Throws:
java.lang.Exception

getJobsInfo

public static java.lang.String getJobsInfo(java.util.ArrayList<java.lang.String> __jobIds,
                                           java.lang.Integer __flags,
                                           java.lang.Integer __infoLevel,
                                           java.util.ArrayList<java.lang.String> __metrics,
                                           java.security.cert.X509Certificate __userCtx)
                                    throws java.lang.Exception
Returns the monitoring information of the requested jobs. Any user of the VO can access monitoring data of the job, but if he is not the owner, access will be restricted to unbuffered system metrics.

Parameters:
jobId - an ArrayList of String which is the list of requested jobs.
flags - an Integer used as a mask to define the metrics to return. TypeOfInfo enum class has the values of each type. P.e. TypeOfInfo.BASIC.val(). Several flags might be combined as logical OR operands. Values and description:

BASIC: Job identification, status and times

JOB_DEFINITION: The JSDL

RESOURCES_ALLOCATED: ReservationIDs

RESOURCES_CONSUMED: Extended information about resources (to be implemented)

USER_METRICS: Metrics added by the user with the addJobMetric method

infoLevel - an Integer defining the sources of information allowed in the operation. InfoLevel enum class should be used to get the right values. P.e. InfoLevel.PROCESS.val(). Values and description:

JOB: it communicates only with the jobMng.

PROCESS: it communicates both with jobMng and exec- or resMng.

KERNEL: it communicates with every needed service and also considers special kernel metrics (to be implemented)

metrics - a list of metrics to obtain, additional to the flags
userCtx - the X509Certificate Object with the user certificate
Returns:
XML String containing the information of the Jobs
Throws:
java.lang.Exception - if 1) Incorrect jobId 2) Invalid User in the Certificate 3) Incorrect list of metrics 4) Not a valid XtreemOS certificate

getJobInfo

public static java.lang.String getJobInfo(java.lang.String __jobId,
                                          java.lang.Integer __flags,
                                          java.lang.Integer __infoLevel,
                                          java.util.ArrayList<java.lang.String> __metricsList,
                                          java.security.cert.X509Certificate __userCtx)
                                   throws java.lang.Exception
TODO: To be eventually deprecated. It's not in the monitoring deliverable

Parameters:
jobId -
flags -
infoLevel -
metricsList -
userCtx -
Returns:
Throws:
java.lang.Exception
See Also:
getJobsInfo(ArrayList, Integer, Integer, ArrayList, X509Certificate)

getJobId

public static java.lang.String getJobId(CommunicationAddress __resourceId,
                                        java.lang.Integer __pid,
                                        java.security.cert.X509Certificate __userCtx)
                                 throws java.lang.Exception
Returns the jobID corresponding to a

Parameters:
resourceId - the CommunicationAddress of the resource where the process is assigned
pid - an Integer with the process identifier local to that resource
userCtx - an X509Certificate object with the user certificate
Returns:
a String representing the jobId
Throws:
java.lang.Exception - when either of these happens: 1) Not a valid XtreemOS certificate 2) Invalid User in the Certificate 3) No jobID associated with the requested

getJobsUser

public static java.util.ArrayList<java.lang.String> getJobsUser(java.lang.String __userId,
                                                                java.security.cert.X509Certificate __userCtx)
                                                         throws java.lang.Exception
Returns all the jobIDs of the jobs belonging to the given user

Parameters:
userId - a String identifying the user we want to obtain the jobs from
userCtx - a X509Certificate object with the user certificate
Returns:
an ArrayList of Strings representing the jobIDs
Throws:
java.lang.Exception - if 1) Not a valid XtreemOS certificate

sendEvent

public static void sendEvent(java.lang.String __jobId,
                             java.lang.Integer __signal,
                             java.lang.Integer __operation,
                             java.util.ArrayList<java.lang.String> __list,
                             java.security.cert.X509Certificate __userCtx)
                      throws java.lang.Exception
Sends an event to a job

Parameters:
signal - number to be sent
operation - can be: 0: ALL 1: MASTER 2: SPECIFYED in list 3: EXCEPT in list
jobId - identifying the job we are going to send the signal to
list -
userCtx - the user certificate TODO: Now we send always the signal to all the processes of the job, use the operation and list parameters
Throws:
java.lang.Exception

jobWait

public static java.lang.Integer jobWait(java.lang.String __jobId,
                                        java.security.cert.X509Certificate __userCtx)
                                 throws java.lang.Exception
Blocks the calling process until the job indicated finishes

Parameters:
jobId - identifying the job the calling process is waiting for
Returns:
the exit value of the job
Throws:
java.lang.Exception

createProcess

public static java.lang.Integer createProcess(java.lang.String __jobId,
                                              java.lang.String __JSDL,
                                              java.lang.String __reservationId,
                                              CommunicationAddress __resource,
                                              java.security.cert.X509Certificate __userCtx)
                                       throws java.lang.Exception
Creates a new Process inside the specified JobID In order to increase performance, user can specify the ReservationID. Resource can be used to force the execution on the resource, (only if it's inside the reservationID). Finally JSDL can be specified to change executable and parameters of the process Priority: Reservation > resource > JSDL > job JSDLInfo

Parameters:
jobId -
JSDL, - JSDL content
reservationId -
resource -
userCtx -
Returns:
Throws:
java.lang.Exception

addDependence

public static void addDependence(java.lang.String __FromJobId,
                                 java.lang.String __toJobId,
                                 java.lang.String __TAG,
                                 java.security.cert.X509Certificate __userCtx)
                          throws java.lang.Exception
This function adds a new job dependence. If we think on an arrow, it will go from FromJobId to ToJobID. We support sets of dependencies identified by TAG, to be able to use them for different purposes. The AEM won't interpret these TAGS, just group dependencies of jobs based on them. AEM won't check cycles in job dependencies. It is user/job responsibility

Parameters:
FromJobId - the job from which tojobId depends
toJobId - the job that depends on fromJobId
TAG - is a name to identify a set of dependencies.
userCtx - the user certificate
Throws:
java.lang.Exception

deleteDependence

public static void deleteDependence(java.lang.String __FromJobId,
                                    java.lang.String __ToJobId,
                                    java.lang.String __TAG,
                                    java.security.cert.X509Certificate __userCtx)
                             throws java.lang.Exception
Deletes an existing dependence between two specific jobs

Parameters:
FromJobId - the job from which tojobId depends
toJobId - the job that depends on fromJobId
TAG - is a name to identify a set of dependencies.
userCtx - the user certificate
Throws:
java.lang.Exception

getListOfDependences

public static java.util.ArrayList<java.lang.String> getListOfDependences(java.lang.String __jobID,
                                                                         java.lang.String __tag,
                                                                         java.lang.Integer __levels,
                                                                         java.lang.Integer __direction,
                                                                         java.security.cert.X509Certificate __userCtx)
                                                                  throws java.lang.Exception
Returns the list of jobs that have a dependence FROM jobID or TO jobID.

Parameters:
jobID - the starting job to get the related jobs
tag - is a name to identify a set of dependencies.
levels - 1 or ALL (0) (TBD)
direction - can be: 0: FROM (up) 1: TO (down)
userCtx - the user certificate
Returns:
list of jobIds
Throws:
java.lang.Exception

updateJobHints

public static void updateJobHints(java.lang.String __jobId,
                                  java.lang.Integer __operation,
                                  java.lang.String __requirements,
                                  java.lang.Boolean __wait,
                                  java.security.cert.X509Certificate __userCtx)
                           throws java.lang.Exception
Modifies the hints passed in createJob function

Parameters:
jobId - identifying the job to change the requirements of
operation - can be: 0: MIGRATION_REQ 1: SCHEDULING_REQ
requirements - identifying the job to change the requirements of
wait - if the call is synchronous or asynchronous
userCtx - the user certificate
Throws:
java.lang.Exception

getJobMetrics

public static java.util.ArrayList<eu.xtreemos.xosd.utilities.metrics.MetricsDesc> getJobMetrics(java.lang.String __jobId,
                                                                                                java.security.cert.X509Certificate __userCtx)
                                                                                         throws java.lang.Exception
Returns the list of available metrics for a specific job, both system and user defined.

Parameters:
jobId - a String identifying the job to get the metrics from, if the jobId is null the generic list of metrics is returned
userCtx - a X509Certificate object with the user certificate
Returns:
an ArrayList of MetricsDesc objects corresponding to the metrics associated to the job
Throws:
java.lang.Exception - if 1) Not a valid XtreemOS certificate 2) Invalid User in the Certificate 3) Incorrect jobId

setMetricValue

public static java.lang.Integer setMetricValue(java.lang.String __jobId,
                                               java.lang.String __metricName,
                                               CommunicationAddress __resourceID,
                                               java.lang.Integer __pid,
                                               java.lang.String __value,
                                               java.security.cert.X509Certificate __userCtx)
                                        throws java.lang.Exception
Sets the value of a Metric. A metric will be an user-defined attribute of the job. Not all the attributes can be set, for instance the user time or the status are set by the system, not by the user.

Parameters:
jobId - a String identifying the job, the metric is associated to.
metricName - is a String with the name of the metric to be set.
value - a String with the value to be set to the metric. It's a string, but it will be parsed according to the metric type. If it's time type, the string must be in jiffies format.
Returns:
an Integer: 0 on success. Callbacks: redirectFunctionCB, returnCB, returnCBE. Might enqueue jobDir.getJobAddr, execMng.addJobMetric and resMng.addJobMetric
Throws:
java.lang.Exception - if 1) Incorrect jobId 2) Invalid User in the Certificate 3) Not a valid XtreemOS certificate 4) Metric doesn't exist 5) Trying to set value on a system metric

setMonitorBuffering

public static java.lang.Integer setMonitorBuffering(java.lang.String __jobId,
                                                    java.lang.String __metricName,
                                                    CommunicationAddress __resourceID,
                                                    java.lang.Integer __pid,
                                                    java.lang.Integer __flags,
                                                    java.security.cert.X509Certificate __userCtx)
                                             throws java.lang.Exception
Switches on and off buffering for the specified metric. With buffering on, multiple values of a metric are returned, and its timestamps represent the time when the value was changed. Only metrics defined as "bufferable" on creation can be buffered.

Parameters:
jobId - a String identifying the job whose metric is about to get buffered. Its worth noticing that buffering is not applied to the whole job but to the smallest part of it according to the scope.
metricName - a String with the name of the metric.
resourceID - the CommunicationAddress of the resource where the buffering is to be applied. Used only if the scope of the metric is resource, jobUnit or process.
pid - Integer with the process ID of the process where the buffering is to be applied. Used only if the scope of the metric is process.
flags - an Integer mask with options to aggregate several metrics, tag buffers and enable or disable buffering. Use flags |= TypeOfInfo.ENABLE.val() to enable buffering flags |= ~TypeOfInfo.ENABLE.val() to disable buffering TODO: add support for metric aggregations, if required.
userCtx - a X509Certificate object with the user certificate.
Returns:
an Integer: 0 on success. Callbacks: redirectFunctionCB, returnCB, returnCBE and getRIDForProcStatusCB. Might enqueue jobDir.getJobAddr, execMng.addJobMetric, resMng.addJobMetric and reservationMng.getReservationFromJob.
Throws:
java.lang.Exception - if 1) Incorrect jobId 2) Invalid User in the Certificate 3) Not a valid XtreemOS certificate 4) Metric doesn't exist 5) Metric cannot provide buffering capabilities

addJobMetric

public static java.lang.Integer addJobMetric(java.lang.String __jobId,
                                             eu.xtreemos.xosd.utilities.metrics.MetricsDesc __metric,
                                             java.security.cert.X509Certificate __userCtx)
                                      throws java.lang.Exception
Adds a new user defined metric to the job. Afterwards, user might give values to it through the setMetricValue interface and get them with getJobInfo. Metrics are checked for correctness before insertion. It might communicate with other services and XOSDs if needed.

Parameters:
jobId - a String identifying the job to add the metric to
metric - a MetricsDesc object with the metric to be added
userCtx - a X509Certificate object with the user certificate
Returns:
an Integer: 0 on success. Callbacks: redirectFunctionCB, returnCB, returnCBE. Might enqueue jobDir.getJobAddr, execMng.addJobMetric and resMng.addJobMetric
Throws:
java.lang.Exception - if 1) Incorrect jobId 2) Invalid User in the Certificate 3) Not a valid XtreemOS certificate 4) Metric already exists 5) Incorrect metric description

updateJobMetric

public static void updateJobMetric(java.lang.String __jobId,
                                   eu.xtreemos.xosd.utilities.metrics.MetricsDesc __metric,
                                   java.security.cert.X509Certificate __userCtx)
                            throws java.lang.Exception
Not defined yet

Throws:
java.lang.Exception

removeJobMetric

public static java.lang.Integer removeJobMetric(java.lang.String __jobId,
                                                java.lang.String __metricName,
                                                java.security.cert.X509Certificate __userCtx)
                                         throws java.lang.Exception
Removes a user defined metric from the job. Data associated to the metric is also erased. It might communicate with other services and XOSDs if needed.

Parameters:
jobId - a String identifying the job to remove the metric from
metricName - a String with the name of the metric to be removed
userCtx - a X509Certificate object with the user certificate
Returns:
an Integer: 0 on success. Callbacks: redirectFunctionCB, returnCB, returnCBE. Might enqueue jobDir.getJobAddr, execMng.addJobMetric and resMng.addJobMetric
Throws:
java.lang.Exception - if 1) Incorrect jobId 2) Invalid User in the Certificate 3) Not a valid XtreemOS certificate 4) Metric doesn't exist 5) Trying to remove a system metric

chgUID

public static void chgUID(java.lang.String __jobId,
                          java.security.cert.X509Certificate __oldUserCtx,
                          java.security.cert.X509Certificate __newUserCtx)
                   throws java.lang.Exception
Changes the UID associated to a jobId

Parameters:
jobId - identifying the job whose user will change
oldUserCtx - the certificate of the current user
newUserCtx - the new certificate to be used
Throws:
java.lang.Exception

updateJobRequirements

public static void updateJobRequirements(java.lang.String __jobId,
                                         java.lang.Integer __operation,
                                         java.lang.String __requirements,
                                         java.lang.Boolean __wait,
                                         java.security.cert.X509Certificate __userCtx)
                                  throws java.lang.Exception
Modifies the requirements passed in createJob function.

Parameters:
jobId - identifying the job to change the requirements of
operation - can be: 0: ADD_RESOURCES 1: RELEASE_RESOURCES 2: EXTEND_RESOURCES
requirements - in a JSDL format specifying the new requirements
wait - if the call is synchronous or asynchronous
userCtx - the user certificate
Throws:
java.lang.Exception

jobMonitoringControl

public static void jobMonitoringControl(java.lang.String __jobId,
                                        java.lang.Integer __op,
                                        java.lang.String __level,
                                        java.security.cert.X509Certificate __userCtx)
                                 throws java.lang.Exception
Update the characteristics of the monitorization of a job. It allows to start We can use start,stop to enable/disable all the callbacks with one XOS call. It is still pending to decide if we are going to use start/stop to automatically call external start/stop functions

Parameters:
jobId -
op - can be: 0:START 1:STOP 2:CHANGE_LEVEL
level - the new monitoring level in case op is set to CHANGE. Can be: High, medium or Low
userCtx - the user certificate
Throws:
java.lang.Exception

waitForEvent

public static void waitForEvent(java.lang.String __jobId,
                                java.lang.Integer __event,
                                java.security.cert.X509Certificate __userCtx)
                         throws java.lang.Exception
Blocks the calling process until "event" is received.

Parameters:
jobId -
event - the event the process is waiting for
userCtx - the user certificate
Throws:
java.lang.Exception

identifyJobManagers

public static void identifyJobManagers(java.util.ArrayList<java.lang.String> __dependentJobs,
                                       java.lang.String __initialJobId,
                                       java.lang.String __strategy,
                                       java.lang.String __options,
                                       java.lang.String __mode,
                                       java.security.cert.X509Certificate __cert)
                                throws java.lang.Exception
identify job manager address of each job

Throws:
java.lang.Exception

lockCheckpoint

public static void lockCheckpoint(java.lang.String __jobId,
                                  java.lang.String __initialJobId,
                                  java.security.cert.X509Certificate __userCert,
                                  CommunicationAddress __jobCpAddr,
                                  CommunicationAddress __superJobCpAddr,
                                  java.lang.String __strategy,
                                  java.lang.String __options,
                                  java.lang.String __mode,
                                  java.util.ArrayList<java.lang.String> __dependentJobs)
                           throws java.lang.Exception
lock a checkpoint action - private member jobslist needed piggyback jsdl file and executable name

Throws:
java.lang.Exception

unlockCheckpoint

public static void unlockCheckpoint(java.lang.String __jobId)
                             throws java.lang.Exception
Throws:
java.lang.Exception

unlockRestart

public static void unlockRestart(java.lang.String __jobId)
                          throws java.lang.Exception
Throws:
java.lang.Exception

recreateJob

public static void recreateJob(java.lang.String __jobId,
                               java.lang.String __initialJobId,
                               java.lang.String __jsdlFileContent,
                               java.lang.String __checkpointVersion,
                               CommunicationAddress __superJobCpAddr,
                               java.util.ArrayList<CommunicationAddress> __jobResourceList,
                               java.security.cert.X509Certificate __userCert)
                        throws java.lang.Exception
set up structures that represent a job in AEM at restart

Throws:
java.lang.Exception