Class JobEnvironment
java.lang.Object
org.tasktide.core.model.job_env.JobEnvironment
- All Implemented Interfaces:
TaskTideModel<JobEnvironment>
-
Constructor Summary
ConstructorsConstructorDescriptionFor Jakarta compatibilityJobEnvironment(String id, JobType type, String jobId, int arrayInd) ConstructJobEnvironment(String id, JobType type, String jobId, String hostname, String hostOS, String javaVersion, int arrayInd, JobState jobState) Construct with all argumentsJobEnvironment(String id, JobType type, String jobId, String hostname, String hostOS, String javaVersion, int arrayInd, JobState jobState, CustomAnnotation anno) Construct with all arguments -
Method Summary
Modifier and TypeMethodDescriptionGet annotationsintGet index in job arrayReturns theJobTypeGet hostname, defined from inet addressGet host os, defined from properties os.name+os.versiongetId()Get Id for job environmentGet java versiongetJobId()Get job IdGets currentJobStateGet job jobTypegetState()Gets currentJobStategetValueFromField(String field) Fetches value for queried fieldstatic JobEnvironmentmakeJobEnvironment(String id, JobType type, String jobId, int arrayInd, String hostname, String hostOS, String javaVersion, JobState jobState, CustomAnnotation anno) Static method supporting json deserialization through which makeJobEnvironment is createdvoidNot implementedvoidSet annotation providedvoidsetArrayInd(int arrayInd) Sets job arrray indexvoidsetHostname(String hostname) Get hostname from inet addressvoidSet host os, defined from properties os.name+os.versionvoidSet IdvoidsetJavaVersion(String javaVersion) Set java versionvoidSets job IdvoidsetJobState(JobState jobState) Sets a newJobStatevoidsetJobType(JobType jobType) SetJobTypetoJson()Represent as JSON-B stringRepresent as JSON-B DocumenttoString()Represent as string
-
Constructor Details
-
JobEnvironment
public JobEnvironment()For Jakarta compatibility -
JobEnvironment
-
JobEnvironment
-
JobEnvironment
-
-
Method Details
-
makeJobEnvironment
public static JobEnvironment makeJobEnvironment(String id, JobType type, String jobId, int arrayInd, String hostname, String hostOS, String javaVersion, JobState jobState, CustomAnnotation anno) Static method supporting json deserialization through which makeJobEnvironment is created- Parameters:
id-type-jobId-arrayInd-hostname-hostOS-javaVersion-jobState-anno-- Returns:
JobEnvironment
-
getJobType
-
getJobId
-
getArrayInd
public int getArrayInd()Get index in job array- Returns:
- long
-
getHostname
-
setHostname
-
getHostOS
-
setHostOS
Set host os, defined from properties os.name+os.version- Parameters:
hostOS-
-
getJavaVersion
-
setJavaVersion
-
getId
Get Id for job environment- Specified by:
getIdin interfaceTaskTideModel<JobEnvironment>- Returns:
- String
-
setId
-
setJobType
-
setJobId
-
setArrayInd
public void setArrayInd(int arrayInd) Sets job arrray index- Parameters:
arrayInd-
-
getAnnotations
Get annotations- Specified by:
getAnnotationsin interfaceTaskTideModel<JobEnvironment>- Returns:
CustomAnnotation
-
setAnnotations
Set annotation provided- Specified by:
setAnnotationsin interfaceTaskTideModel<JobEnvironment>- Parameters:
anno-
-
toJson
Represent as JSON-B string- Specified by:
toJsonin interfaceTaskTideModel<JobEnvironment>- Returns:
- String
-
toJsonDoc
Represent as JSON-B Document- Specified by:
toJsonDocin interfaceTaskTideModel<JobEnvironment>- Returns:
- String
-
getState
Gets currentJobState- Specified by:
getStatein interfaceTaskTideModel<JobEnvironment>- Returns:
- String
-
getJobState
-
setJobState
-
getCollection
Returns theJobType- Specified by:
getCollectionin interfaceTaskTideModel<JobEnvironment>- Returns:
- String
-
resetModel
public void resetModel()Not implemented- Specified by:
resetModelin interfaceTaskTideModel<JobEnvironment>
-
toString
-
getValueFromField
Fetches value for queried field- Specified by:
getValueFromFieldin interfaceTaskTideModel<JobEnvironment>- Parameters:
field-- Returns:
- Object
-