Package de.dlr.proseo.planner.rest.model
Class PodKube
java.lang.Object
de.dlr.proseo.model.rest.model.PlannerPod
de.dlr.proseo.planner.rest.model.PodKube
- All Implemented Interfaces:
Serializable
Represents a Kubernetes pod/job and provides methods to handle its data. Extends PlannerPod to inherit common pod properties.
- Author:
- Ernst Melchinger
- See Also:
-
Field Summary
Fields inherited from class de.dlr.proseo.model.rest.model.PlannerPod
completiontime, id, log, name, starttime, status, succeded, type -
Constructor Summary
ConstructorsConstructorDescriptionPodKube(io.kubernetes.client.openapi.models.V1Job job) Constructs a PodKube object based on the provided Kubernetes job. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if the job has a specific status.booleanChecks if the job has been completed.Methods inherited from class de.dlr.proseo.model.rest.model.PlannerPod
equals, getCompletiontime, getId, getLog, getName, getStarttime, getStatus, getSucceded, getType, hashCode, setCompletiontime, setId, setLog, setName, setStarttime, setStatus, setSucceded, setType, toString
-
Constructor Details
-
PodKube
public PodKube(io.kubernetes.client.openapi.models.V1Job job) Constructs a PodKube object based on the provided Kubernetes job. Extracts relevant information from the job and sets instance variables.- Parameters:
job- Kubernetes job
-
-
Method Details
-
isCompleted
public boolean isCompleted()Checks if the job has been completed.- Returns:
- true if the job has been completed, otherwise false
-
hasStatus
Checks if the job has a specific status.- Parameters:
status- the status to check for- Returns:
- true if the job's state equals the specified status or if the job is completed and type is specified as completed, otherwise false
-