public interface

SimulationExecutor

uk.ac.imperial.presage2.core.cli.run.SimulationExecutor
Known Indirect Subclasses

Class Overview

A SimulationExecutor is capable of executing simulations from their ID.

Summary

Public Methods
abstract boolean enableLogs()
Returns whether this executor will log output to file.
abstract void enableLogs(boolean saveLogs)
Enable or disable saving of execution logs to file.
abstract String getLogsDirectory()
Get directory to which execution log will be written.
abstract int maxConcurrent()
Get the maximum number of simultaneously executing simulations this executor can handle.
abstract void run(long simId)
Submits a simulation to be run on this executor.
abstract int running()
Get the number of simulations this executor is currently running.
abstract void setLogsDirectory(String logsDir)
Set directory to which execution logs will be written.

Public Methods

public abstract boolean enableLogs ()

Returns whether this executor will log output to file.

public abstract void enableLogs (boolean saveLogs)

Enable or disable saving of execution logs to file.

public abstract String getLogsDirectory ()

Get directory to which execution log will be written.

public abstract int maxConcurrent ()

Get the maximum number of simultaneously executing simulations this executor can handle.

Returns
  • max. no. of concurrent simulations.

public abstract void run (long simId)

Submits a simulation to be run on this executor.

Parameters
simId Id of the simulation to run.
Throws
InsufficientResourcesException if the executor does not have enough resources to handle this request and so refuses to fulfil it.

public abstract int running ()

Get the number of simulations this executor is currently running.

Returns
  • no. of simulations currently running.

public abstract void setLogsDirectory (String logsDir)

Set directory to which execution logs will be written.