diff options
| author | Paul Buetow <paul@buetow.org> | 2008-07-25 14:55:44 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-07-25 14:55:44 +0000 |
| commit | 8b8eed5c5709af3553daf9b41db5ec53518585da (patch) | |
| tree | 18fd8438f11e8520f8242cfe317c4e945367b776 /sources/protocols/implementations/VSOnePhaseCommitProtocol.java | |
| parent | e84e73ec1d970bf5e24d0f541d4f37dab318ee3c (diff) | |
one phase commit
Diffstat (limited to 'sources/protocols/implementations/VSOnePhaseCommitProtocol.java')
| -rw-r--r-- | sources/protocols/implementations/VSOnePhaseCommitProtocol.java | 9 |
1 files changed, 7 insertions, 2 deletions
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(); + } } } |
