public class

ExecutorManager

extends Thread
java.lang.Object
   ↳ java.lang.Thread
     ↳ uk.ac.imperial.presage2.core.cli.run.ExecutorManager

Class Overview

Manages a set of SimulationExecutors and a queue of Simulations to be run on them.

Simulations can be added to the queue with addSimulation(long) and these will be executed as soon as the executors will allow. Tasks are split equally among the SimulationExecutors up to each one's resource limit (as given my maxConcurrent().

The ExecutorManager thread acts as a Consumer and will continue to run until a simulation with ID 0 is passed to addSimulation(long). Once this is detected it will wait for all executors to finish then shutdown the thread.

Summary

[Expand]
Inherited Constants
From class java.lang.Thread
Public Constructors
ExecutorManager()
Public Methods
void addSimulation(long simId)
Add a simulation to be run by an executor in the pool.
void run()
[Expand]
Inherited Methods
From class java.lang.Thread
From class java.lang.Object
From interface java.lang.Runnable

Public Constructors

public ExecutorManager ()

Public Methods

public void addSimulation (long simId)

Add a simulation to be run by an executor in the pool.

public void run ()

Since: API Level