public class ScriptAgentLauncherSelectorImpl extends java.lang.Object implements AgentLauncherSelector
AgentLauncherSelector interface which uses user-provided script to make decisions
based on the list of agent launchers and the job request supplied.| Constructor and Description |
|---|
ScriptAgentLauncherSelectorImpl(AgentLauncherSelectorManagedScript agentLauncherSelectorManagedScript,
java.util.Collection<AgentLauncher> agentLaunchers,
io.micrometer.core.instrument.MeterRegistry registry)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<AgentLauncher> |
getAgentLaunchers()
Get the list of all available
AgentLauncher. |
ResourceSelectionResult<AgentLauncher> |
select(@Valid AgentLauncherSelectionContext context)
Select a resource from the given set of resources if possible.
|
public ScriptAgentLauncherSelectorImpl(AgentLauncherSelectorManagedScript agentLauncherSelectorManagedScript, java.util.Collection<AgentLauncher> agentLaunchers, io.micrometer.core.instrument.MeterRegistry registry)
agentLauncherSelectorManagedScript - the agent launcher selector scriptagentLaunchers - the available agent launchersregistry - the metrics registrypublic ResourceSelectionResult<AgentLauncher> select(@Valid @Valid AgentLauncherSelectionContext context) throws ResourceSelectionException
select in interface ResourceSelector<AgentLauncher,AgentLauncherSelectionContext>context - The context specific for this resource selectionResourceSelectionResult instance which contains information about the result of this
invocationResourceSelectionException - When the underlying implementation can't successfully come to a selection
decisionpublic java.util.Collection<AgentLauncher> getAgentLaunchers()
AgentLauncherSelectorAgentLauncher.getAgentLaunchers in interface AgentLauncherSelectorAgentLauncher