@PublicAPI public abstract class JobState extends Job implements Comparable<JobState>
Modifier and Type | Field and Description |
---|---|
static int |
ASC_ORDER
Used to sort according to ascendant order
|
static int |
DESC_ORDER
Used to sort according to descendant order
|
static int |
SORT_BY_DESCRIPTION
Used to sort by description
|
static int |
SORT_BY_ID
Used to sort by id
|
static int |
SORT_BY_NAME
Used to sort by name
|
static int |
SORT_BY_OWNER
Used to sort by owner
|
static int |
SORT_BY_PRIORITY
Used to sort by priority
|
static int |
SORT_BY_PROJECT
Used to sort by project name
|
static int |
SORT_BY_STATUS
Used to sort by status
|
static int |
SORT_BY_TYPE
Used to sort by type
|
description, globalSpace, inputSpace, JOB_DDL, JOB_EXEC_TIME, name, outputSpace, priority, projectName, unresolvedVariables, userSpace, variables, visualization
GENERIC_INFO_START_AT_KEY, genericInformation, maxNumberOfExecution, onTaskError, restartTaskOnError, unresolvedGenericInformation
Constructor and Description |
---|
JobState()
ProActive default constructor
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(JobState job) |
boolean |
equals(Object o) |
long |
getFinishedTime()
To get the finishedTime
|
abstract Map<TaskId,TaskState> |
getHMTasks()
To get the tasks as a hash map.
|
JobId |
getId()
To get the id
|
long |
getInErrorTime() |
abstract JobInfo |
getJobInfo()
To get the jobInfo of this job.
|
String |
getName()
To get the name of the job.
|
int |
getNumberOfFailedTasks()
To get the numberOfFailedTask
|
int |
getNumberOfFaultyTasks()
To get the numberOfFailedTask
|
int |
getNumberOfFinishedTasks()
To get the numberOfFinishedTask
|
int |
getNumberOfInErrorTasks()
To get the numberOfInErrorTask
|
int |
getNumberOfPendingTasks()
To get the numberOfPendingTask
|
int |
getNumberOfRunningTasks()
To get the numberOfRunningTask
|
abstract String |
getOwner()
To get the owner of the job.
|
JobPriority |
getPriority()
To get the priority of the job.
|
long |
getRemovedTime()
To get the removedTime
|
Map<String,String> |
getRuntimeGenericInformation()
Returns job generic information, where job variables, PA_JOB_ID, PA_JOB_NAME and PA_USER were replaced
|
long |
getStartTime()
To get the startTime
|
JobStatus |
getStatus()
To get the status of the job.
|
long |
getSubmittedTime()
To get the submittedTime
|
List<String> |
getTags()
To get the list of available tags in a job.
|
List<String> |
getTags(String prefix)
To get the list of available tags in a job and that matches a given prefix.
|
TaskStatesPage |
getTaskByTagPaginated(String tag,
int offset,
int limit)
To get the paginated filtered tasks by a given tag.
|
abstract List<TaskState> |
getTasks()
To get the tasks as an array list.
|
List<TaskState> |
getTasksByTag(String tag)
To get the task as an array list and filtered by a given tag.
|
TaskStatesPage |
getTasksPaginated(int offset,
int limit)
To get the paginated tasks.
|
int |
getTotalNumberOfTasks()
To get the totalNumberOfTasks
|
int |
hashCode() |
boolean |
isFinished()
To know if the job is finished or not.
|
boolean |
isToBeRemoved()
Get the toBeRemoved property.
|
static void |
setSortingBy(int sortBy)
Set the field to sort on.
|
static void |
setSortingOrder(int order)
Set the order for the next sort.
|
String |
toString() |
abstract void |
update(JobInfo jobInfo)
To update the content of this job with a jobInfo.
|
abstract void |
update(TaskInfo info)
Set the jobInfo contained in the TaskInfo to this job.
|
display, getDescription, getGlobalSpace, getInputSpace, getJobContent, getJobDeadline, getJobExpectedExecutionTime, getOutputSpace, getProjectName, getType, getUnresolvedVariables, getUserSpace, getVariables, getVariablesAsReplacementMap, getVisualization, setDescription, setGlobalSpace, setInputSpace, setJobContent, setName, setOutputSpace, setPriority, setProjectName, setUnresolvedVariables, setUserSpace, setVariables, setVisualization, verifyVariableMap
addGenericInformation, addGenericInformations, applyReplacementsOnGenericInformation, getGenericInformation, getMaxNumberOfExecution, getMaxNumberOfExecutionProperty, getOnTaskErrorProperty, getRestartTaskOnError, getRestartTaskOnErrorProperty, getUnresolvedGenericInformation, setGenericInformation, setMaxNumberOfExecution, setOnTaskError, setRestartTaskOnError, setUnresolvedGenericInformation
public static final int SORT_BY_ID
public static final int SORT_BY_NAME
public static final int SORT_BY_PRIORITY
public static final int SORT_BY_TYPE
public static final int SORT_BY_DESCRIPTION
public static final int SORT_BY_OWNER
public static final int SORT_BY_STATUS
public static final int SORT_BY_PROJECT
public static final int ASC_ORDER
public static final int DESC_ORDER
public abstract void update(TaskInfo info)
info
- a taskInfo containing a job info.public abstract void update(JobInfo jobInfo)
jobInfo
- the jobInfo to setpublic static void setSortingBy(int sortBy)
sortBy
- the field on which the sort will be made.public static void setSortingOrder(int order)
order
- public int compareTo(JobState job)
compareTo
in interface Comparable<JobState>
job
- The internal job to be compared.Comparable.compareTo(java.lang.Object)
public abstract JobInfo getJobInfo()
public JobId getId()
Job
getId
in class Job
Job.getId()
public JobPriority getPriority()
Job
getPriority
in class Job
Job.getPriority()
public abstract List<TaskState> getTasks()
public abstract Map<TaskId,TaskState> getHMTasks()
public List<TaskState> getTasksByTag(String tag)
tag
- the used to filter the tasks.public TaskStatesPage getTasksPaginated(int offset, int limit)
offset
- the starting index of the sublist of tasks to getlimit
- the last index (non inclusive) of the sublist of tasks to getpublic TaskStatesPage getTaskByTagPaginated(String tag, int offset, int limit)
tag
- used to filter the tasksoffset
- the starting index of the sublist of tasks to getlimit
- the last index (non inclusive) of the sublist of tasks to getpublic List<String> getTags()
public List<String> getTags(String prefix)
prefix
- the prefix used to filter the tags.public int getNumberOfFinishedTasks()
public boolean isFinished()
public long getFinishedTime()
public int getNumberOfPendingTasks()
public int getNumberOfRunningTasks()
public int getNumberOfFailedTasks()
public int getNumberOfFaultyTasks()
public int getNumberOfInErrorTasks()
public long getStartTime()
public long getInErrorTime()
public int getTotalNumberOfTasks()
public long getRemovedTime()
public long getSubmittedTime()
public JobStatus getStatus()
public abstract String getOwner()
public boolean isToBeRemoved()
public String getName()
Job
getName
in class Job
Job.getName()
public int hashCode()
hashCode
in class Object
Object.hashCode()
public boolean equals(Object o)
equals
in class Object
Object.equals(java.lang.Object)
public String toString()
toString
in class Job
Object.toString()