org.gcube.application.enm.service
Class GenericJob
java.lang.Object
org.gcube.application.enm.service.GenericJob
- All Implemented Interfaces:
- Comparable<GenericJob>, Callable<String>
- Direct Known Subclasses:
- COMPSsJob, OMWSJob
public abstract class GenericJob
- extends Object
- implements Callable<String>, Comparable<GenericJob>
Represents a job. Execution resource providers must extend this class with
the implementation details specific to how the experiments are executed in
their platforms. They must override the method Callable.call() with
the logic that allows the management of the complete life-cycle of the job,
and the constructors GenericJob(UUID, ExperimentRequest)
and GenericJob(UUID, ExperimentRequest, ExperimentStatus, ExperimentResults, ExperimentLogs),
which are used by PluginLoader to load and inject new providers into
the service.
Class JobMonitor uses this logic to manage the execution of the job.
Note: This class has a natural ordering that is inconsistent with
equals.
- Author:
- Erik Torres
|
Field Summary |
protected org.gcube.common.core.utils.logging.GCUBELog |
logger
|
protected org.gcube.application.enm.common.xml.logs.ExperimentLogs |
logs
|
static int |
MAXIMUM_PRIORITY
|
static int |
MINIMUM_PRIORITY
|
protected org.gcube.application.enm.common.xml.request.ExperimentRequest |
request
|
protected org.gcube.application.enm.common.xml.results.ExperimentResults |
results
|
protected org.gcube.application.enm.common.xml.status.ExperimentStatus |
status
|
protected UUID |
uuid
|
|
Constructor Summary |
GenericJob(UUID uuid,
org.gcube.application.enm.common.xml.request.ExperimentRequest request)
|
GenericJob(UUID uuid,
org.gcube.application.enm.common.xml.request.ExperimentRequest request,
org.gcube.application.enm.common.xml.status.ExperimentStatus status,
org.gcube.application.enm.common.xml.results.ExperimentResults results,
org.gcube.application.enm.common.xml.logs.ExperimentLogs logs)
|
| Methods inherited from interface java.util.concurrent.Callable |
call |
logger
protected org.gcube.common.core.utils.logging.GCUBELog logger
MINIMUM_PRIORITY
public static int MINIMUM_PRIORITY
MAXIMUM_PRIORITY
public static int MAXIMUM_PRIORITY
uuid
protected final UUID uuid
request
protected final org.gcube.application.enm.common.xml.request.ExperimentRequest request
status
protected final org.gcube.application.enm.common.xml.status.ExperimentStatus status
results
protected final org.gcube.application.enm.common.xml.results.ExperimentResults results
logs
protected final org.gcube.application.enm.common.xml.logs.ExperimentLogs logs
GenericJob
public GenericJob(UUID uuid,
org.gcube.application.enm.common.xml.request.ExperimentRequest request)
GenericJob
public GenericJob(UUID uuid,
org.gcube.application.enm.common.xml.request.ExperimentRequest request,
org.gcube.application.enm.common.xml.status.ExperimentStatus status,
org.gcube.application.enm.common.xml.results.ExperimentResults results,
org.gcube.application.enm.common.xml.logs.ExperimentLogs logs)
next
protected void next(int step,
String jobId)
next
protected void next(int step,
List<String> jobIds)
next
protected void next(int step,
String[] jobIds)
currentStep
protected int currentStep()
currentJobIds
protected List<String> currentJobIds()
getUUID
public final UUID getUUID()
getRequest
public final org.gcube.application.enm.common.xml.request.ExperimentRequest getRequest()
getStatus
public final org.gcube.application.enm.common.xml.status.ExperimentStatus getStatus()
getResults
public final org.gcube.application.enm.common.xml.results.ExperimentResults getResults()
getLogs
public final org.gcube.application.enm.common.xml.logs.ExperimentLogs getLogs()
getPriority
public int getPriority()
setPriority
public void setPriority(int priority)
isCanceled
public final boolean isCanceled()
cancel
public final void cancel()
getExecutionResource
public abstract ExecutionResource getExecutionResource()
compareTo
public int compareTo(GenericJob other)
- Specified by:
compareTo in interface Comparable<GenericJob>
equals
public boolean equals(Object other)
- Overrides:
equals in class Object
Copyright © 2012. All Rights Reserved.