Package com.facebook.buck.worker
Interface WorkerProcessParams
-
public interface WorkerProcessParams
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getMaxWorkers()
Maximum number of tools that pool can have.com.google.common.collect.ImmutableList<String>
getStartupCommand()
Command that is used to start the worker job, e.g.com.google.common.collect.ImmutableMap<String,String>
getStartupEnvironment()
Environment that will be used to start the worker tool.Path
getTempDir()
Temp folder location.Optional<WorkerProcessIdentity>
getWorkerProcessIdentity()
Identifies the instance of the persisted worker process pool.boolean
isAsync()
Whether we use synchronous 1-command-at-a-time processes, or one process with a max number of tasksstatic WorkerProcessParams
of(Path tempDir, com.google.common.collect.ImmutableList<String> startupCommand, com.google.common.collect.ImmutableMap<String,String> startupEnvironment, int maxWorkers, boolean isAsync, Optional<WorkerProcessIdentity> workerProcessIdentity)
-
-
-
Method Detail
-
getTempDir
Path getTempDir()
Temp folder location. This will be used to store .args, .out and .err files. Additionally, this will be set into TMP environment variable which worker process tool can use to store other temporary files, or locate .args, .out and .err files and perform output into them.
-
getStartupCommand
com.google.common.collect.ImmutableList<String> getStartupCommand()
Command that is used to start the worker job, e.g. "my_hashing_tool". It is expected that this tool will be able to act as a worker process (communicate using specific protocol, accept jobs, etc.)
-
getStartupEnvironment
com.google.common.collect.ImmutableMap<String,String> getStartupEnvironment()
Environment that will be used to start the worker tool.
-
getMaxWorkers
int getMaxWorkers()
Maximum number of tools that pool can have.
-
isAsync
boolean isAsync()
Whether we use synchronous 1-command-at-a-time processes, or one process with a max number of tasks
-
getWorkerProcessIdentity
Optional<WorkerProcessIdentity> getWorkerProcessIdentity()
Identifies the instance of the persisted worker process pool. Defines when worker process pool should be invalidated.If this value is absent, then key will be automatically computed based on the startup command and startup arguments.
-
of
static WorkerProcessParams of(Path tempDir, com.google.common.collect.ImmutableList<String> startupCommand, com.google.common.collect.ImmutableMap<String,String> startupEnvironment, int maxWorkers, boolean isAsync, Optional<WorkerProcessIdentity> workerProcessIdentity)
-
-