diff options
Diffstat (limited to 'subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.java')
-rw-r--r-- | subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.java | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.java b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.java new file mode 100644 index 00000000..ea70e61d --- /dev/null +++ b/subprojects/viatra-runtime/src/main/java/tools/refinery/viatra/runtime/matchers/util/resumable/MaskedResumable.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.matchers.util.resumable; | ||
10 | |||
11 | import java.util.Map; | ||
12 | |||
13 | import tools.refinery.viatra.runtime.matchers.tuple.Tuple; | ||
14 | import tools.refinery.viatra.runtime.matchers.util.timeline.Diff; | ||
15 | |||
16 | /** | ||
17 | * A masked {@link Resumable} implementation, which maintains lazy folding per tuple signature. | ||
18 | * | ||
19 | * @author Tamas Szabo | ||
20 | * @since 2.4 | ||
21 | */ | ||
22 | public interface MaskedResumable<Timestamp extends Comparable<Timestamp>> extends Resumable<Timestamp> { | ||
23 | |||
24 | /** | ||
25 | * When called, the folding of the state shall be resumed at the given timestamp. The resumable is expected to | ||
26 | * do a folding step at the given timestamp only. Afterwards, folding shall be interrupted, even if there is more | ||
27 | * folding to do towards higher timestamps. | ||
28 | */ | ||
29 | public Map<Tuple, Map<Tuple, Diff<Timestamp>>> resumeAt(final Timestamp timestamp); | ||
30 | |||
31 | /** | ||
32 | * Returns the set of signatures for which lazy folding shall be resumed at the next timestamp. | ||
33 | */ | ||
34 | public Iterable<Tuple> getResumableSignatures(); | ||
35 | |||
36 | } | ||