public static class JobEnvironment.Builder
extends java.lang.Object
JobEnvironment
instance.Constructor and Description |
---|
Builder(int memory)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
JobEnvironment |
build()
Build a new immutable instance of an
JobEnvironment . |
JobEnvironment.Builder |
withCpu(java.lang.Integer cpu)
Set the number of CPU cores that should be allocated to run the associated job.
|
JobEnvironment.Builder |
withEnvironmentVariables(java.util.Map<java.lang.String,java.lang.String> environmentVariables)
Set any environment variables that the agent should add to the job runtime.
|
JobEnvironment.Builder |
withExt(com.fasterxml.jackson.databind.JsonNode ext)
Set the extension configuration for the agent.
|
JobEnvironment.Builder |
withMemory(int memory)
Set the amount of memory (in MB) that should be allocated for the job processes.
|
public Builder(int memory)
memory
- The amount of memory (in MB) to allocate for the jobpublic JobEnvironment.Builder withCpu(@Nullable java.lang.Integer cpu)
cpu
- The number of CPU's. Must be greater than or equal to 1.public JobEnvironment.Builder withMemory(int memory)
memory
- The memory. Must be greater than or equal to 1 but preferably much morepublic JobEnvironment.Builder withEnvironmentVariables(@Nullable java.util.Map<java.lang.String,java.lang.String> environmentVariables)
environmentVariables
- Additional environment variablespublic JobEnvironment.Builder withExt(@Nullable com.fasterxml.jackson.databind.JsonNode ext)
ext
- The extension configuration which is effectively a DSL per job launch implementationpublic JobEnvironment build()
JobEnvironment
.