public class AgentLauncherSelectorManagedScript extends ResourceSelectorScript<AgentLauncher,AgentLauncherSelectionContext>
ResourceSelectorScript that delegates selection of a job's agent launcher when more than one
choice is available. See also: AgentLauncherSelector.| Constructor and Description |
|---|
AgentLauncherSelectorManagedScript(ScriptManager scriptManager,
AgentLauncherSelectorScriptProperties properties,
io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
addParametersForScript(java.util.Map<java.lang.String,java.lang.Object> parameters,
AgentLauncherSelectionContext context)
Add any implementation specific parameters to the map of parameters to send to the script.
|
ResourceSelectorScriptResult<AgentLauncher> |
selectResource(AgentLauncherSelectionContext context)
Given the
JobRequest and an associated set of resources which matched the request criteria
invoke the configured script to see if a preferred resource is selected based on the current logic. |
evaluateScript, warmUppublic AgentLauncherSelectorManagedScript(ScriptManager scriptManager, AgentLauncherSelectorScriptProperties properties, io.micrometer.core.instrument.MeterRegistry registry)
scriptManager - script managerproperties - script manager propertiesregistry - meter registrypublic ResourceSelectorScriptResult<AgentLauncher> selectResource(AgentLauncherSelectionContext context) throws ResourceSelectionException
JobRequest and an associated set of resources which matched the request criteria
invoke the configured script to see if a preferred resource is selected based on the current logic.selectResource in class ResourceSelectorScript<AgentLauncher,AgentLauncherSelectionContext>context - The ResourceSelectionContext instance containing information about the context for this
selectionResourceSelectorScriptResult instanceResourceSelectionException - If an unexpected error occurs during selectionprotected void addParametersForScript(java.util.Map<java.lang.String,java.lang.Object> parameters,
AgentLauncherSelectionContext context)
addParametersForScript in class ResourceSelectorScript<AgentLauncher,AgentLauncherSelectionContext>parameters - The existing set of parameters for implementations to add tocontext - The selection context