OverviewSingleDeprecatedPropertiesEventsXSL Parameters

jsx3.util

class JobGraph

Object
->jsx3.util.JobGraph

All Implemented Interfaces:

jsx3.util.EventDispatcher

class JobGraph
extends Object
No description provided.

Since:

3.6

Field Summary
static String
DONE
Event subject published when the job graph empties.
static String
RAN_JOB
Event subject published when a job is finished.
Constructor Summary
void
The instance initializer.
Method Summary
void
addJob(objJob : jsx3.util.Job, preReqs : String | Array<String>, postReqs : String | Array<String>)
Add a job to this manager.
void
addPrereq(objJob : String | jsx3.util.Job, preJob : String | jsx3.util.Job)
Adds a prerequisite to the job with id jobId.
void
Returns the number of jobs that have finished.
void
insertJob(newJob : ?, referenceJob : ?)
Inserts newJob as a graph root and adds all children of referenceJob as children of newJob.
boolean
void
Pauses this job manager.
void
Resets this job manager.
void
Starts this job manager.
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From Object
toString
Field Detail

DONE

static String DONE
Event subject published when the job graph empties.

RAN_JOB

static String RAN_JOB
Event subject published when a job is finished.
Constructor Detail

init

void init()
The instance initializer.
Method Detail

addJob

void addJob(objJob : jsx3.util.Job, preReqs : String | Array<String>, postReqs : String | Array<String>)
Add a job to this manager. If the manager is running and no prerequisites are specified then the job is run immediately.

Parameters:

objJobthe job to add.
preReqsthe ids of all the jobs that must finish before the job is run.
postReqsthe ids of all the jobs that must must not run before the job is run.

Throws:

{Error}if a job with the same id as objJob is currently waiting in this manager or if any prerequisite id does not correspond to a job not currently waiting in this job manager.

addPrereq

void addPrereq(objJob : String | jsx3.util.Job, preJob : String | jsx3.util.Job)
Adds a prerequisite to the job with id jobId.

Parameters:

objJobthe job or its ID to which to add the prerequisite.
preJobthe job or its ID that is a prerequisite of job objJob.

Throws:

{Error}if either parameter refers to a job not currently waiting in this job manager.

doneCt

void doneCt()
Returns the number of jobs that have finished.

insertJob

void insertJob(newJob : ?, referenceJob : ?)
Inserts newJob as a graph root and adds all children of referenceJob as children of newJob. This method is typically called in the "onDone" of referenceJob, when it creates newJob and wants newJob to run before any dependent jobs of itself (referenceJob).

Parameters:

newJob
referenceJob

isRunning

boolean isRunning()

Returns:

 

pause

void pause()
Pauses this job manager.

reset

void reset()
Resets this job manager.

start

void start()
Starts this job manager.