Class RandomClusterSelectorImpl
java.lang.Object
com.netflix.genie.web.selectors.impl.RandomClusterSelectorImpl
- All Implemented Interfaces:
ClusterSelector
,ResourceSelector<Cluster,
ClusterSelectionContext>
Basic implementation of a
ClusterSelector
where a random Cluster
is selected from the options
presented.- Since:
- 2.0.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionselect
(ClusterSelectionContext context) Select a resource from the given set of resources if possible.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.netflix.genie.web.selectors.ResourceSelector
select
-
Constructor Details
-
RandomClusterSelectorImpl
public RandomClusterSelectorImpl()
-
-
Method Details
-
select
public ResourceSelectionResult<Cluster> select(@Valid ClusterSelectionContext context) throws ResourceSelectionException Select a resource from the given set of resources if possible.- Specified by:
select
in interfaceResourceSelector<R,
C extends ResourceSelectionContext<R>> - Parameters:
context
- The context specific for this resource selection- Returns:
- The a
ResourceSelectionResult
instance which contains information about the result of this invocation - Throws:
ResourceSelectionException
- When the underlying implementation can't successfully come to a selection decision
-