Class RandomAgentLauncherSelectorImpl
java.lang.Object
com.netflix.genie.web.selectors.impl.RandomAgentLauncherSelectorImpl
- All Implemented Interfaces:
AgentLauncherSelector,ResourceSelector<AgentLauncher,AgentLauncherSelectionContext>
Basic implementation of a
AgentLauncherSelector where a random AgentLauncher is selected from the
options presented.- Since:
- 4.0.0
-
Constructor Summary
ConstructorsConstructorDescriptionRandomAgentLauncherSelectorImpl(Collection<AgentLauncher> agentLaunchers) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionselect(AgentLauncherSelectionContext 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, waitMethods inherited from interface com.netflix.genie.web.selectors.AgentLauncherSelector
getAgentLaunchersMethods inherited from interface com.netflix.genie.web.selectors.ResourceSelector
select
-
Constructor Details
-
RandomAgentLauncherSelectorImpl
Constructor.- Parameters:
agentLaunchers- the list of availableAgentLauncher.
-
-
Method Details
-
select
public ResourceSelectionResult<AgentLauncher> select(@Valid AgentLauncherSelectionContext context) throws ResourceSelectionException Select a resource from the given set of resources if possible.- Specified by:
selectin interfaceResourceSelector<R,C extends ResourceSelectionContext<R>> - 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
-