Class RandomAgentLauncherSelectorImpl
- java.lang.Object
-
- com.netflix.genie.web.selectors.impl.RandomAgentLauncherSelectorImpl
-
- All Implemented Interfaces:
AgentLauncherSelector
,ResourceSelector<AgentLauncher,AgentLauncherSelectionContext>
public class RandomAgentLauncherSelectorImpl extends java.lang.Object implements AgentLauncherSelector
Basic implementation of aAgentLauncherSelector
where a randomAgentLauncher
is selected from the options presented.- Since:
- 4.0.0
-
-
Constructor Summary
Constructors Constructor Description RandomAgentLauncherSelectorImpl(java.util.Collection<AgentLauncher> agentLaunchers)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceSelectionResult<R>
select(C 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.AgentLauncherSelector
getAgentLaunchers
-
Methods inherited from interface com.netflix.genie.web.selectors.ResourceSelector
select
-
-
-
-
Constructor Detail
-
RandomAgentLauncherSelectorImpl
public RandomAgentLauncherSelectorImpl(java.util.Collection<AgentLauncher> agentLaunchers)
Constructor.- Parameters:
agentLaunchers
- the list of availableAgentLauncher
.
-
-
Method Detail
-
select
public ResourceSelectionResult<R> select(@Valid C 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
-
-