diff options
| author | Fabian Mastenbroek <mail.fabianm@gmail.com> | 2022-10-31 19:36:45 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-31 19:36:45 +0100 |
| commit | 9d06fb04319a50c26599f2da5387a2d03bee15ec (patch) | |
| tree | 1dd498da02298c9924f6c37974f4311df6948cb2 /opendc-simulator/opendc-simulator-flow/src | |
| parent | b96acc687f59b698fbc4d4c984d77b008cd4051b (diff) | |
| parent | c9750e52a10157f3838b934fed4f04fae69c539a (diff) | |
merge: Support snapshotting simulated workloads (#113)
This pull request adds support for snapshotting simulated workloads in OpenDC, which
serves as the basis for virtual machine migration/suspension support.
Part of #32
## Implementation Notes :hammer_and_pick:
* Support synchronous update of FlowStage
* Report exceptions in onStop as suppressed
* Add support for snapshotting workloads
Diffstat (limited to 'opendc-simulator/opendc-simulator-flow/src')
| -rw-r--r-- | opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java b/opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java index 4d098043..ed5579ea 100644 --- a/opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java +++ b/opendc-simulator/opendc-simulator-flow/src/main/java/org/opendc/simulator/flow2/FlowStage.java @@ -152,6 +152,15 @@ public final class FlowStage { } /** + * Synchronously update the {@link FlowStage} at the current timestamp. + */ + public void sync() { + this.flags |= STAGE_INVALIDATE; + onUpdate(clock.millis()); + engine.scheduleDelayed(this); + } + + /** * Close the {@link FlowStage} and disconnect all inlets and outlets. */ public void close() { |
