diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-06-21 14:34:10 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-21 14:34:10 +0200 |
| commit | ba32561e4b0e00c00d528df615a58e396e0fddc0 (patch) | |
| tree | 06bbb8161910a81b3dc1160b180650660bc50be4 /opendc-simulator/opendc-simulator-power | |
| parent | b8b0f39028af90fa54b42a00214b2ea9a5e48e2e (diff) | |
| parent | 966715d7df139a431293f5c2fc67916fbcc1ecfb (diff) | |
simulator: Optimize resource interpreter implementation
This pull request implements several optimizations in the resource interpreter implementation.
* Interpreter is now shared across hosts in experiments
* Interpreter allocations are pooled where possible
* Resource lifecycle concept is eliminated
* Optimized flag management in interpreter
Diffstat (limited to 'opendc-simulator/opendc-simulator-power')
| -rw-r--r-- | opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt index 11034a57..3ce85d02 100644 --- a/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt +++ b/opendc-simulator/opendc-simulator-power/src/main/kotlin/org/opendc/simulator/power/SimPdu.kt @@ -83,7 +83,7 @@ public class SimPdu( /** * A PDU outlet. */ - public class Outlet(private val provider: SimResourceProvider) : SimPowerOutlet(), AutoCloseable { + public class Outlet(private val provider: SimResourceCloseableProvider) : SimPowerOutlet(), AutoCloseable { override fun onConnect(inlet: SimPowerInlet) { provider.startConsumer(inlet.createConsumer()) } |
