Package com.netflix.genie.web.selectors
Interface ResourceSelector<R,C extends ResourceSelectionContext<R>>
-
- Type Parameters:
R
- The type of resource this selector is selectingC
- The type of context which this selector will accept. Must extendResourceSelectionContext
- All Known Subinterfaces:
AgentLauncherSelector
,ClusterSelector
,CommandSelector
- All Known Implementing Classes:
RandomAgentLauncherSelectorImpl
,RandomClusterSelectorImpl
,RandomCommandSelectorImpl
,ScriptAgentLauncherSelectorImpl
,ScriptClusterSelectorImpl
,ScriptCommandSelectorImpl
@Validated public interface ResourceSelector<R,C extends ResourceSelectionContext<R>>
Generic interface for a selector which selects a resource from a set of resources for a given job request.- Since:
- 4.0.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourceSelectionResult<R>
select(C context)
Select a resource from the given set of resources if possible.
-
-
-
Method Detail
-
select
ResourceSelectionResult<R> select(@Valid C context) throws ResourceSelectionException
Select a resource from the given set of resources if possible.- 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
-
-