Class ScriptAgentLauncherSelectorImpl
java.lang.Object
com.netflix.genie.web.selectors.impl.ScriptAgentLauncherSelectorImpl
- All Implemented Interfaces:
AgentLauncherSelector,ResourceSelector<AgentLauncher,AgentLauncherSelectionContext>
An implementation of the
AgentLauncherSelector interface which uses user-provided script to make decisions
based on the list of agent launchers and the job request supplied.- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionScriptAgentLauncherSelectorImpl(AgentLauncherSelectorManagedScript agentLauncherSelectorManagedScript, Collection<AgentLauncher> agentLaunchers, io.micrometer.core.instrument.MeterRegistry registry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGet the list of all availableAgentLauncher.select(@Valid AgentLauncherSelectionContext context) Select a resource from the given set of resources if possible.
-
Constructor Details
-
ScriptAgentLauncherSelectorImpl
public ScriptAgentLauncherSelectorImpl(AgentLauncherSelectorManagedScript agentLauncherSelectorManagedScript, Collection<AgentLauncher> agentLaunchers, io.micrometer.core.instrument.MeterRegistry registry) Constructor.- Parameters:
agentLauncherSelectorManagedScript- the agent launcher selector scriptagentLaunchers- the available agent launchersregistry- the metrics registry
-
-
Method Details
-
select
public ResourceSelectionResult<AgentLauncher> select(@Valid @Valid AgentLauncherSelectionContext context) throws ResourceSelectionException Select a resource from the given set of resources if possible.- Specified by:
selectin interfaceResourceSelector<AgentLauncher,AgentLauncherSelectionContext> - Parameters:
context- The context specific for this resource selection- Returns:
- The a
ResourceSelectionResultinstance which contains information about the result of this invocation - Throws:
ResourceSelectionException- When the underlying implementation can't successfully come to a selection decision
-
getAgentLaunchers
Description copied from interface:AgentLauncherSelectorGet the list of all availableAgentLauncher.- Specified by:
getAgentLaunchersin interfaceAgentLauncherSelector- Returns:
- a collection of
AgentLauncher
-