Package com.facebook.buck.worker
Class WorkerProcessPoolFactory
- java.lang.Object
-
- com.facebook.buck.worker.WorkerProcessPoolFactory
-
public class WorkerProcessPoolFactory extends Object
WorkerProcessPoolFactory class is designed to provide you an instance of WorkerProcessPool based on the params for the job that you provide. It manages that pool, that is, creates one if it is missing. You then may use the resulting pool to borrow new WorkerProcess instances from it to perform your job.
-
-
Constructor Summary
Constructors Constructor Description WorkerProcessPoolFactory(ProjectFilesystem filesystem)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkerProcess
createWorkerProcess(ProcessExecutorParams processParams, ExecutionContext context, Path tmpDir)
com.google.common.collect.ImmutableList<String>
getCommand(Platform platform, WorkerProcessParams paramsToUse)
com.google.common.collect.ImmutableMap<String,String>
getEnvironmentForProcess(ExecutionContext context, WorkerProcessParams workerJobParams)
WorkerProcessPool
getWorkerProcessPool(ExecutionContext context, WorkerProcessParams paramsToUse)
Returns an existing WorkerProcessPool for the given job params if one exists, otherwise creates a new one.
-
-
-
Constructor Detail
-
WorkerProcessPoolFactory
public WorkerProcessPoolFactory(ProjectFilesystem filesystem)
-
-
Method Detail
-
getWorkerProcessPool
public WorkerProcessPool getWorkerProcessPool(ExecutionContext context, WorkerProcessParams paramsToUse)
Returns an existing WorkerProcessPool for the given job params if one exists, otherwise creates a new one.
-
getCommand
public com.google.common.collect.ImmutableList<String> getCommand(Platform platform, WorkerProcessParams paramsToUse)
-
getEnvironmentForProcess
public com.google.common.collect.ImmutableMap<String,String> getEnvironmentForProcess(ExecutionContext context, WorkerProcessParams workerJobParams)
-
createWorkerProcess
public WorkerProcess createWorkerProcess(ProcessExecutorParams processParams, ExecutionContext context, Path tmpDir) throws IOException
- Throws:
IOException
-
-