Class ScriptClusterSelectorImpl
- java.lang.Object
- 
- com.netflix.genie.web.selectors.impl.ScriptClusterSelectorImpl
 
- 
- All Implemented Interfaces:
- ClusterSelector,- ResourceSelector<Cluster,ClusterSelectionContext>
 
 public class ScriptClusterSelectorImpl extends java.lang.Object implements ClusterSelector An implementation of theClusterSelectorinterface which uses user-provided script to make decisions based on the list of clusters and the job request supplied.- Since:
- 3.1.0
 
- 
- 
Constructor SummaryConstructors Constructor Description ScriptClusterSelectorImpl(ClusterSelectorManagedScript clusterSelectorManagedScript, io.micrometer.core.instrument.MeterRegistry registry)Constructor.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceSelectionResult<Cluster>select(@Valid ClusterSelectionContext context)Select a resource from the given set of resources if possible.
 
- 
- 
- 
Constructor Detail- 
ScriptClusterSelectorImplpublic ScriptClusterSelectorImpl(ClusterSelectorManagedScript clusterSelectorManagedScript, io.micrometer.core.instrument.MeterRegistry registry) Constructor.- Parameters:
- clusterSelectorManagedScript- the cluster selector script
- registry- the metrics registry
 
 
- 
 - 
Method Detail- 
selectpublic ResourceSelectionResult<Cluster> select(@Valid @Valid ClusterSelectionContext context) throws ResourceSelectionException Select a resource from the given set of resources if possible.- Specified by:
- selectin interface- ResourceSelector<Cluster,ClusterSelectionContext>
- 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
 
 
- 
 
-