public class

RemoteSubProcessExecutor

extends SubProcessExecutor
implements SimulationExecutor
java.lang.Object
   ↳ uk.ac.imperial.presage2.core.cli.run.SubProcessExecutor
     ↳ uk.ac.imperial.presage2.core.cli.run.RemoteSubProcessExecutor

Class Overview

Runs a simulation on a remote machine via ssh. Note this implementation may not work in all situations. We assume the following:

  • ssh and rsync commands available on the path of the local machine (and usable from a Process)
  • Passwordless login from the above commands to the remote machine.
  • Write access to the specified working directory in order to transfer classpath dependencies.
  • java command available on the path of the remote machine (and usable from ssh).
  • The remote machine has access to the database via the settings specified in db.properties

Summary

[Expand]
Inherited Fields
From class uk.ac.imperial.presage2.core.cli.run.SubProcessExecutor
Public Constructors
RemoteSubProcessExecutor(int mAX_PROCESSES, String remoteUser, String remoteHost, String remoteWorkingDir)
RemoteSubProcessExecutor(int max_processes, String remoteHost, String remoteWorkingDir, String remoteUser, String xms, String xmx, int gcThreads)
RemoteSubProcessExecutor(int max_processes, String remoteHost, String remoteWorkingDir, String remoteUser, String... customArgs)
Public Methods
synchronized void run(long simId)
Submits a simulation to be run on this executor.
String toString()
Protected Methods
ProcessBuilder createProcess(long simId)
Create a ProcessBuilder which will spawn a Process to run the given simulation.@return
void initialise()
[Expand]
Inherited Methods
From class uk.ac.imperial.presage2.core.cli.run.SubProcessExecutor
From class java.lang.Object
From interface uk.ac.imperial.presage2.core.cli.run.SimulationExecutor

Public Constructors

public RemoteSubProcessExecutor (int mAX_PROCESSES, String remoteUser, String remoteHost, String remoteWorkingDir)

public RemoteSubProcessExecutor (int max_processes, String remoteHost, String remoteWorkingDir, String remoteUser, String xms, String xmx, int gcThreads)

public RemoteSubProcessExecutor (int max_processes, String remoteHost, String remoteWorkingDir, String remoteUser, String... customArgs)

Public Methods

public synchronized void run (long simId)

Submits a simulation to be run on this executor.

Parameters
simId Id of the simulation to run.

public String toString ()

Since: API Level

Protected Methods

protected ProcessBuilder createProcess (long simId)

Create a ProcessBuilder which will spawn a Process to run the given simulation.@return

protected void initialise ()

Throws
IOException