public class WorkerSelectUtils extends Object
| Modifier and Type | Method and Description | 
|---|---|
static ImmutableWorkerInfo | 
selectWorker(Task task,
            Map<String,ImmutableWorkerInfo> allWorkers,
            WorkerTaskRunnerConfig workerTaskRunnerConfig,
            AffinityConfig affinityConfig,
            Function<com.google.common.collect.ImmutableMap<String,ImmutableWorkerInfo>,ImmutableWorkerInfo> workerSelector)
Helper for  
WorkerSelectStrategy implementations. | 
@Nullable public static ImmutableWorkerInfo selectWorker(Task task, Map<String,ImmutableWorkerInfo> allWorkers, WorkerTaskRunnerConfig workerTaskRunnerConfig, @Nullable AffinityConfig affinityConfig, Function<com.google.common.collect.ImmutableMap<String,ImmutableWorkerInfo>,ImmutableWorkerInfo> workerSelector)
WorkerSelectStrategy implementations.allWorkers - map of all workers, in the style provided to WorkerSelectStrategyaffinityConfig - affinity config, or nullworkerSelector - function that receives a list of eligible workers: version is high enough, worker can run
                       the task, and worker satisfies the affinity config. may return null.Copyright © 2011–2018. All rights reserved.