diff options
Diffstat (limited to 'subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java')
-rw-r--r-- | subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java new file mode 100644 index 00000000..8097bd91 --- /dev/null +++ b/subprojects/viatra-runtime-rete/src/main/java/tools/refinery/viatra/runtime/rete/network/communication/timely/ResumableNode.java | |||
@@ -0,0 +1,36 @@ | |||
1 | /******************************************************************************* | ||
2 | * Copyright (c) 2010-2016, Tamas Szabo, Istvan Rath and Daniel Varro | ||
3 | * This program and the accompanying materials are made available under the | ||
4 | * terms of the Eclipse Public License v. 2.0 which is available at | ||
5 | * http://www.eclipse.org/legal/epl-v20.html. | ||
6 | * | ||
7 | * SPDX-License-Identifier: EPL-2.0 | ||
8 | *******************************************************************************/ | ||
9 | package tools.refinery.viatra.runtime.rete.network.communication.timely; | ||
10 | |||
11 | import tools.refinery.viatra.runtime.rete.network.IGroupable; | ||
12 | import tools.refinery.viatra.runtime.rete.network.Node; | ||
13 | import tools.refinery.viatra.runtime.rete.network.communication.Timestamp; | ||
14 | |||
15 | /** | ||
16 | * {@link Node}s that implement this interface can resume folding of their states when instructed during timely evaluation. | ||
17 | * | ||
18 | * @since 2.3 | ||
19 | * @author Tamas Szabo | ||
20 | */ | ||
21 | public interface ResumableNode extends Node, IGroupable { | ||
22 | |||
23 | /** | ||
24 | * When called, the folding of the state shall be resumed at the given timestamp. The resumable is expected to | ||
25 | * do a folding step at the given timestamp only. Afterwards, folding shall be interrupted, even if there is more | ||
26 | * folding to do towards higher timestamps. | ||
27 | */ | ||
28 | public void resumeAt(final Timestamp timestamp); | ||
29 | |||
30 | /** | ||
31 | * Returns the smallest timestamp where lazy folding shall be resumed, or null if there is no more folding to do in this | ||
32 | * resumable. | ||
33 | */ | ||
34 | public Timestamp getResumableTimestamp(); | ||
35 | |||
36 | } | ||