Class CommandRequest.Builder
- java.lang.Object
-
- com.netflix.genie.common.external.dtos.v4.CommonRequestImpl.Builder<CommandRequest.Builder>
-
- com.netflix.genie.common.external.dtos.v4.CommandRequest.Builder
-
- Enclosing class:
- CommandRequest
public static class CommandRequest.Builder extends com.netflix.genie.common.external.dtos.v4.CommonRequestImpl.Builder<CommandRequest.Builder>
Builder for a V4 Command Request.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description Builder(CommandMetadata metadata, java.util.List<java.lang.String> executable)
Constructor which has required fields.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CommandRequest
build()
Build a new CommandRequest instance.CommandRequest.Builder
withCheckDelay(java.lang.Long checkDelay)
Set the amount of time (in milliseconds) desired to delay between checks of the job status for jobs run using this command.CommandRequest.Builder
withClusterCriteria(java.util.List<Criterion> clusterCriteria)
Set the ordered list ofCriterion
that should be used to resolve which clusters this command can run on at any given time.CommandRequest.Builder
withMemory(java.lang.Integer memory)
Set the amount of memory (in MB) to default jobs run with this command to use.
-
-
-
Constructor Detail
-
Builder
public Builder(CommandMetadata metadata, java.util.List<java.lang.String> executable)
Constructor which has required fields.- Parameters:
metadata
- The user supplied metadata about a command resourceexecutable
- The executable arguments to use on job process launch. Typically the binary path followed by optional default parameters for that given binary. Must have at least one. Blanks will be removed
-
-
Method Detail
-
withMemory
public CommandRequest.Builder withMemory(@Nullable java.lang.Integer memory)
Set the amount of memory (in MB) to default jobs run with this command to use.- Parameters:
memory
- The default amount of memory (in MB) for jobs to use- Returns:
- The builder
-
withCheckDelay
public CommandRequest.Builder withCheckDelay(@Nullable java.lang.Long checkDelay)
Set the amount of time (in milliseconds) desired to delay between checks of the job status for jobs run using this command.- Parameters:
checkDelay
- The amount of time (in milliseconds) between checks. Minimum 1 preferably much more- Returns:
- The builder
-
withClusterCriteria
public CommandRequest.Builder withClusterCriteria(@Nullable java.util.List<Criterion> clusterCriteria)
Set the ordered list ofCriterion
that should be used to resolve which clusters this command can run on at any given time.- Parameters:
clusterCriteria
- TheCriterion
in priority order- Returns:
- The builder
-
build
public CommandRequest build()
Build a new CommandRequest instance.- Returns:
- The immutable command request
-
-