@ThreadSafe public final class DefaultSimulationInfrastructure extends Object implements SimulationInfrastructure
SimulationInfrastructure.SimulationInfrastructure,
FakeLoad,
LoadController,
ExecutorService| Constructor and Description |
|---|
DefaultSimulationInfrastructure(ExecutorService executorService,
LoadController controller)
Creates a new
DefaultSimulationInfrastructure instance using the
provided ExecutorService and LoadController. |
| Modifier and Type | Method and Description |
|---|---|
void |
decreaseSystemLoadBy(FakeLoad load)
Decreases the system load simulated by the simulation infrastructure
by the specified
FakeLoad |
void |
increaseSystemLoadBy(FakeLoad load)
Increases the system load simulated by the simulation infrastructure
by the specified
FakeLoad instance |
public DefaultSimulationInfrastructure(ExecutorService executorService, LoadController controller)
DefaultSimulationInfrastructure instance using the
provided ExecutorService and LoadController.executorService - the thread pool used for executing simulator threadscontroller - the controller used for controlling simulator threads and
overall system load in concurrent scenariospublic void increaseSystemLoadBy(FakeLoad load) throws MaximumLoadExceededException
SimulationInfrastructureFakeLoad instanceincreaseSystemLoadBy in interface SimulationInfrastructureload - the load by which the overall system load is increasedMaximumLoadExceededException - in case the specified increase of the system load
would exceed the allowed maximum load of the systempublic void decreaseSystemLoadBy(FakeLoad load)
SimulationInfrastructureFakeLoaddecreaseSystemLoadBy in interface SimulationInfrastructureload - the load by which the overall system load is decreasedCopyright © 2017. All rights reserved.