Class ScriptCommandSelectorImpl
java.lang.Object
com.netflix.genie.web.selectors.impl.ScriptCommandSelectorImpl
- All Implemented Interfaces:
CommandSelector,ResourceSelector<com.netflix.genie.common.internal.dtos.Command,CommandSelectionContext>
Implementation of
CommandSelector which defers the decision to a script provided by the system
administrators.- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionScriptCommandSelectorImpl(CommandSelectorManagedScript commandSelectorManagedScript, io.micrometer.core.instrument.MeterRegistry registry) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionResourceSelectionResult<com.netflix.genie.common.internal.dtos.Command>select(@Valid CommandSelectionContext context) Select a resource from the given set of resources if possible.
-
Constructor Details
-
ScriptCommandSelectorImpl
public ScriptCommandSelectorImpl(CommandSelectorManagedScript commandSelectorManagedScript, io.micrometer.core.instrument.MeterRegistry registry) Constructor.- Parameters:
commandSelectorManagedScript- TheCommandSelectorManagedScriptinstance to useregistry- TheMeterRegistryto use
-
-
Method Details
-
select
public ResourceSelectionResult<com.netflix.genie.common.internal.dtos.Command> select(@Valid @Valid CommandSelectionContext context) throws ResourceSelectionException Select a resource from the given set of resources if possible.- Specified by:
selectin interfaceResourceSelector<com.netflix.genie.common.internal.dtos.Command,CommandSelectionContext> - 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
-