public final class WorkerState extends Object
| Constructor and Description |
|---|
WorkerState() |
| Modifier and Type | Method and Description |
|---|---|
void |
setcpus(int numberOfCpus)
Sets the maximum number of concurrent workers.
|
void |
start(int numberOfCpus,
String host,
String username,
String password,
boolean internal,
String courtesyCommand,
File courtesyWorkingDirectory,
long courtesyPollingInterval)
Starts the worker process.
|
void |
stat(int index)
Prints the status of the worker threads.
|
void |
stop()
Stops the worker process.
|
public void start(int numberOfCpus,
String host,
String username,
String password,
boolean internal,
String courtesyCommand,
File courtesyWorkingDirectory,
long courtesyPollingInterval)
numberOfCpus - The number of worker threads to spawn.host - The name of the host to connect to.username - The user name to log in with.password - The password to log in with.internal - If set, class definitions downloaded from the server will
be cached in memory only. Otherwise, class definitions will be
persisted to a database.courtesyCommand - an optional shell command to be invoked
periodically to query whether to continue processing worker tasks. If
the shell script returns a non-zero exit code, worker tasks will be
suspended. Worker tasks will resume when the shell script returns an
exit code of zero.courtesyWorkingDirectory - the working directory in which to run the
courtesyCommand shell scriptcourtesyPollingInterval - the number of seconds between invocations
of the courtesyCommand shell scriptpublic void setcpus(int numberOfCpus)
numberOfCpus - The number of CPUs to use (zero to use all available
CPUs on the machine).public void stop()
public void stat(int index)
index - The 1-based index of the worker thread to print the status
of, or zero to print the status of all worker threads.Copyright © 2017. All rights reserved.