summaryrefslogtreecommitdiff
path: root/opendc-simulator/opendc-simulator-power
diff options
context:
space:
mode:
authorFabian Mastenbroek <mail.fabianm@gmail.com>2021-06-21 14:34:10 +0200
committerGitHub <noreply@github.com>2021-06-21 14:34:10 +0200
commitba32561e4b0e00c00d528df615a58e396e0fddc0 (patch)
tree06bbb8161910a81b3dc1160b180650660bc50be4 /opendc-simulator/opendc-simulator-power
parentb8b0f39028af90fa54b42a00214b2ea9a5e48e2e (diff)
parent966715d7df139a431293f5c2fc67916fbcc1ecfb (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.kt2
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())
}