public class CommandSelectionContext extends ResourceSelectionContext<Command>
ResourceSelectionContext
to include specific data useful in command selection.Constructor and Description |
---|
CommandSelectionContext(@NotBlank java.lang.String jobId,
@NotNull JobRequest jobRequest,
boolean apiJob,
@NotEmpty java.util.Map<Command,java.util.Set<Cluster>> commandToClusters)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Set<Command> |
getResources()
Return the
Set of distinct resources that a selector is meant to chose from. |
public CommandSelectionContext(@NotBlank @NotBlank java.lang.String jobId, @NotNull @NotNull JobRequest jobRequest, boolean apiJob, @NotEmpty @NotEmpty java.util.Map<Command,java.util.Set<Cluster>> commandToClusters)
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 candidatespublic java.util.Set<Command> getResources()
Set
of distinct resources that a selector is meant to chose from.getResources
in class ResourceSelectionContext<Command>