diff options
| author | Paul Buetow <paul@buetow.org> | 2008-05-26 17:39:03 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2008-05-26 17:39:03 +0000 |
| commit | d04ee66ac7a02e7e226478bdc0eebdd97f060e14 (patch) | |
| tree | 641362ceaaf0f8814c3d732b5e2d26f7616979a7 /sources/protocols | |
| parent | d0b6e434d76cfea9e3096f0d50706c9a286a4b9d (diff) | |
Vector type introduced @ VSPrefs.
Diffstat (limited to 'sources/protocols')
| -rw-r--r-- | sources/protocols/implementations/OnePhaseCommitProtocol.java | 12 | ||||
| -rw-r--r-- | sources/protocols/implementations/README (renamed from sources/protocols/README) | 4 |
2 files changed, 11 insertions, 5 deletions
diff --git a/sources/protocols/implementations/OnePhaseCommitProtocol.java b/sources/protocols/implementations/OnePhaseCommitProtocol.java index cb720f3..cb984d3 100644 --- a/sources/protocols/implementations/OnePhaseCommitProtocol.java +++ b/sources/protocols/implementations/OnePhaseCommitProtocol.java @@ -4,7 +4,7 @@ */ package protocols.implementations; -import java.util.ArrayList; +import java.util.Vector; import protocols.VSProtocol; import core.VSMessage; @@ -16,7 +16,6 @@ public class OnePhaseCommitProtocol extends VSProtocol { private static final long serialVersionUID = 1L; /* Client variables, coordinator */ - private ArrayList<Integer> peerPids; /* Server variables, peers */ private boolean ackSent; @@ -26,7 +25,14 @@ public class OnePhaseCommitProtocol extends VSProtocol { */ public OnePhaseCommitProtocol() { setClassname(getClass().toString()); - initInteger("numProcesses", 0, "Anzahl beteilitger Prozesse"); + + /* Can be changed via GUI variables editor of each process */ + Vector<Integer> vec = new Vector<Integer>(); + vec.add(2); + vec.add(3); + vec.add(4); + + initVector("pids", vec, "PIDs beteilitger Prozesse"); } /* (non-Javadoc) diff --git a/sources/protocols/README b/sources/protocols/implementations/README index 3bf4f6d..8126ce0 100644 --- a/sources/protocols/README +++ b/sources/protocols/implementations/README @@ -4,7 +4,7 @@ How to add a new protocol: 2. Edit YourOwnNiceProtocol.java and replace the classname! -3. Edit the initialize method of RegisteredProtocols.java and add the classname -of your protocol. E.g.: "org.buetow.vs.protocols.YourOwnNiceProtocol" +3. Edit the initialize method of events.RegisteredEvents.java and add the classname +of your protocol. E.g.: "protocols.implementations.YourOwnNiceProtocol" |
