diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-06-20 22:56:33 +0200 |
|---|---|---|
| committer | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2021-06-21 12:19:43 +0200 |
| commit | d54ac10449083a490e741d6c54e6f3aa07b71af0 (patch) | |
| tree | 64632acc289887610c8ccd39b4f0aec9515881ef /opendc-simulator/opendc-simulator-power | |
| parent | 4b9559ce78e1853600c816f8228205ddf405c5a2 (diff) | |
simulator: Remove concept of resource lifecycle
This change removes the AutoCloseable interface from the
SimResourceProvider and removes the concept of a resource lifecycle.
Instead, resource providers are now either active (running a resource
consumer) or in-active (being idle), which simplifies implementation.
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()) } |
