Package com.netflix.genie.web.selectors
Class CommandSelectionContext
java.lang.Object
com.netflix.genie.web.selectors.ResourceSelectionContext<Command>
com.netflix.genie.web.selectors.CommandSelectionContext
Extension of
ResourceSelectionContext
to include specific data useful in command selection.- Since:
- 4.0.0
-
Constructor Summary
ConstructorDescriptionCommandSelectionContext
(@NotBlank String jobId, @NotNull JobRequest jobRequest, boolean apiJob, @NotEmpty Map<@Valid Command, @NotEmpty Set<@Valid Cluster>> commandToClusters) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturn theSet
of distinct resources that a selector is meant to chose from.
-
Constructor Details
-
CommandSelectionContext
public CommandSelectionContext(@NotBlank @NotBlank String jobId, @NotNull @NotNull JobRequest jobRequest, boolean apiJob, @NotEmpty @NotEmpty Map<@Valid Command, @NotEmpty Set<@Valid Cluster>> commandToClusters) Constructor.- Parameters:
jobId
- The id of the job which the command is being selected forjobRequest
- The job request the user originally madeapiJob
- Whether the job was submitted via the API or from Agent CLIcommandToClusters
- The map of command candidates to their respective clusters candidates
-
-
Method Details
-
getResources
Return theSet
of distinct resources that a selector is meant to chose from.- Specified by:
getResources
in classResourceSelectionContext<Command>
- Returns:
- The resources
-