Package com.netflix.genie.common.dto
Class JobExecution.Builder
java.lang.Object
com.netflix.genie.common.dto.BaseDTO.Builder<JobExecution.Builder>
com.netflix.genie.common.dto.JobExecution.Builder
- Enclosing class:
- JobExecution
A builder to create job requests.
- Since:
- 3.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the job request.withArchiveStatus
(ArchiveStatus archiveStatus) Set the archive status for this job.withCheckDelay
(Long checkDelay) Set the amount of time (in milliseconds) to delay between checks of the process.withExitCode
(Integer exitCode) Set the exit code for the jobs' execution.withLauncherExt
(com.fasterxml.jackson.databind.JsonNode launcherExt) Set the launcher extension for this job.withMemory
(Integer memory) Deprecated.withProcessId
(Integer processId) Set the process id for the jobs' execution.withRuntime
(Runtime runtime) Set the runtime this job is executing with.withTimeout
(Instant timeout) Set the timeout date when the job will be failed if it hasn't completed by.Methods inherited from class com.netflix.genie.common.dto.BaseDTO.Builder
withCreated, withId, withUpdated
-
Constructor Details
-
Builder
Constructor which has required fields.- Parameters:
hostName
- The hostname where the job is running
-
-
Method Details
-
withProcessId
Set the process id for the jobs' execution.- Parameters:
processId
- The process id- Returns:
- The builder
-
withCheckDelay
Set the amount of time (in milliseconds) to delay between checks of the process.- Parameters:
checkDelay
- The check delay to use- Returns:
- The builder
-
withTimeout
Set the timeout date when the job will be failed if it hasn't completed by.- Parameters:
timeout
- The timeout date- Returns:
- The builder
-
withExitCode
Set the exit code for the jobs' execution. If not set will default to -1.- Parameters:
exitCode
- The exit code.- Returns:
- The builder
-
withMemory
Deprecated.UsewithRuntime(Runtime)
insteadSet the amount of memory (in MB) to use for this job execution.- Parameters:
memory
- The amount of memory in megabytes- Returns:
- The builder
-
withArchiveStatus
Set the archive status for this job.- Parameters:
archiveStatus
- The archive status- Returns:
- The builder
-
withLauncherExt
public JobExecution.Builder withLauncherExt(@Nullable com.fasterxml.jackson.databind.JsonNode launcherExt) Set the launcher extension for this job.- Parameters:
launcherExt
- The launcher extension- Returns:
- The builder
-
withRuntime
Set the runtime this job is executing with.- Parameters:
runtime
- The runtime- Returns:
- This
JobExecution.Builder
instance
-
build
Build the job request.- Returns:
- Create the final read-only JobRequest instance
-
withRuntime(Runtime)
instead