java.lang.Object | |
↳ | uk.ac.imperial.presage2.core.cli.run.SubProcessExecutor |
Known Direct Subclasses |
A SimulationExecutor
which has a set of sub processes which each runs
a simulation. This abstract class automates the management of these
processes. It calls the createProcess(long)
function to get a
ProcessBuilder with which to spawn the process to manage. This class
can also log output from these processes to files.
Fields | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
MAX_PROCESSES | |||||||||||
customArgs | |||||||||||
gcThreads | |||||||||||
logger | |||||||||||
processMonitor | |||||||||||
running | |||||||||||
xms | |||||||||||
xmx |
Protected Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create SubProcessExecutor which can execute at most
max_processes processes in parallel. | |||||||||||
Create SubProcessExecutor with the given properties:
| |||||||||||
Create SubProcessExecutor with a custom array of properties passed to
java.
|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns whether this executor will log output to file.
| |||||||||||
Enable or disable saving of execution logs to file.
| |||||||||||
Get directory to which execution log will be written.
| |||||||||||
Get the maximum number of simultaneously executing simulations this
executor can handle.
| |||||||||||
Submits a simulation to be run on this executor.
| |||||||||||
Get the number of simulations this executor is currently running.
| |||||||||||
Set directory to which execution logs will be written.
|
Protected Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Create a ProcessBuilder which will spawn a Process to run
the given simulation.@return
| |||||||||||
Get the list of arguments which should be passed to the java executable
for the vm.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
uk.ac.imperial.presage2.core.cli.run.SimulationExecutor
|
Create SubProcessExecutor which can execute at most
max_processes
processes in parallel. The processes will use
default vm arguments.
max_processes | max concurrent processes |
---|
Create SubProcessExecutor with the given properties:
max_processes | max concurrent processes |
---|---|
xms | -Xms value for JVM |
xmx | -Xmx value for JVM |
gcThreads | Number of threads to use for parallel GC. |
Create SubProcessExecutor with a custom array of properties passed to java.
max_processes | max concurrent processes |
---|---|
customArgs | array of args to pass to java executable on the command line. |
Returns whether this executor will log output to file.
Enable or disable saving of execution logs to file.
Get directory to which execution log will be written.
Get the maximum number of simultaneously executing simulations this executor can handle.
Submits a simulation to be run on this executor.
simId | Id of the simulation to run. |
---|
Get the number of simulations this executor is currently running.
Set directory to which execution logs will be written.
Create a ProcessBuilder which will spawn a Process to run the given simulation.@return
Get the list of arguments which should be passed to the java executable for the vm. These arguments come before the program args.