summaryrefslogtreecommitdiff
path: root/sources/protocols/implementations
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2008-07-25 14:55:44 +0000
committerPaul Buetow <paul@buetow.org>2008-07-25 14:55:44 +0000
commit8b8eed5c5709af3553daf9b41db5ec53518585da (patch)
tree18fd8438f11e8520f8242cfe317c4e945367b776 /sources/protocols/implementations
parente84e73ec1d970bf5e24d0f541d4f37dab318ee3c (diff)
one phase commit
Diffstat (limited to 'sources/protocols/implementations')
-rw-r--r--sources/protocols/implementations/VSBerkelyTimeProtocol.java2
-rw-r--r--sources/protocols/implementations/VSOnePhaseCommitProtocol.java9
2 files changed, 8 insertions, 3 deletions
diff --git a/sources/protocols/implementations/VSBerkelyTimeProtocol.java b/sources/protocols/implementations/VSBerkelyTimeProtocol.java
index 576c0d0..f432a1f 100644
--- a/sources/protocols/implementations/VSBerkelyTimeProtocol.java
+++ b/sources/protocols/implementations/VSBerkelyTimeProtocol.java
@@ -71,7 +71,7 @@ public class VSBerkelyTimeProtocol extends VSAbstractProtocol {
*/
public void onServerInit() {
Vector<Integer> vec = new Vector<Integer>();
- vec.add(2);
+ vec.add(1);
vec.add(3);
initVector("pids", vec, "PIDs beteiliger Prozesse");
}
diff --git a/sources/protocols/implementations/VSOnePhaseCommitProtocol.java b/sources/protocols/implementations/VSOnePhaseCommitProtocol.java
index 18c20a5..653a098 100644
--- a/sources/protocols/implementations/VSOnePhaseCommitProtocol.java
+++ b/sources/protocols/implementations/VSOnePhaseCommitProtocol.java
@@ -56,7 +56,7 @@ public class VSOnePhaseCommitProtocol extends VSAbstractProtocol {
public void onServerInit() {
/* Can be changed via GUI variables editor of each process */
Vector<Integer> vec = new Vector<Integer>();
- vec.add(2);
+ vec.add(1);
vec.add(3);
initVector("pids", vec, "PIDs beteilitger Prozesse");
@@ -109,9 +109,14 @@ public class VSOnePhaseCommitProtocol extends VSAbstractProtocol {
logg("ACK von Prozess " + pid + " erhalten!");
- if (pids.size() == 0)
+ if (pids.size() == 0) {
logg("ACKs von allen beteiligten Prozessen erhalten! " +
"Festgeschrieben!");
+
+ /* Remove the active schedule which has been created in the
+ onServerStart method */
+ removeSchedules();
+ }
}
}