Class JobExecutionRequest
java.lang.Object
com.polarion.platform.jobs.scheduler.JobExecutionRequest
- All Implemented Interfaces:
Serializable
Job execution request.
- Author:
- Stepan Roh, Polarion Software
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Job scope parameter name - seeIJobUnit.setScope(com.polarion.platform.context.IContext)
-
Constructor Summary
ConstructorsConstructorDescriptionJobExecutionRequest
(String jobName, String jobLabel, Map parameters) Creates the request without cluster node preference.JobExecutionRequest
(String jobName, String jobLabel, Map parameters, NodeSelector nodeSelector) Constructor. -
Method Summary
-
Field Details
-
PARAM_SCOPE
Job scope parameter name - seeIJobUnit.setScope(com.polarion.platform.context.IContext)
- See Also:
-
-
Constructor Details
-
JobExecutionRequest
Creates the request without cluster node preference.- See Also:
-
JobExecutionRequest
public JobExecutionRequest(String jobName, String jobLabel, Map parameters, NodeSelector nodeSelector) Constructor.Given job parameters can be of any type - system will try to convert them to proper values upon creation of
IJobUnit
. Mapping from parameter name to set method follows Java Beans convention: first character is capitalized andset
is prepended.- Parameters:
jobName
- job name (seeIJobUnitFactory.getName()
)jobLabel
- job label (seeIJobUnitFactory.createJobUnit(String)
)parameters
- job parameters asMap
betweenString
key andObject
valuenodeSelector
- cluster node selector (seegetNodeSelector()
)- Throws:
IllegalArgumentException
- if jobName isnull
IllegalArgumentException
- if jobLabel isnull
IllegalArgumentException
- if parameters isnull
IllegalArgumentException
- if nodeSelector isnull
- Since:
- 3.8.0
-
-
Method Details
-
getJobLabel
Returns job label.- Returns:
- job label (not
null
)
-
getJobName
Returns job name.- Returns:
- job name (not
null
)
-
getParameters
Returns job parameters.- Returns:
- job parameters (not
null
)
-
getNodeSelector
Determines on which node the job should run in a cluster setup. Note that in order to run a job on a remote node it is required that all the job parameters are serializable.- Since:
- 3.8.0
-
hashCode
public int hashCode() -
equals
-
toString
-