Permalink
Browse files

Remove clientId references

  • Loading branch information...
1 parent ea2342d commit f881f1c18c87cc522b6d652eddbc65984a90d10b @dgomezferro committed Oct 22, 2012
@@ -39,8 +39,7 @@
private int from;
ReplyStore replyStore;
- public ClientState(int clientId, int servers, int quorum, int inlineThreshold, int asyncMessages) {
- this.clientId = clientId;
+ public ClientState(int servers, int quorum, int inlineThreshold, int asyncMessages) {
this.servers = servers;
this.quorum = quorum;
this.inlineThreshold = inlineThreshold;
@@ -111,8 +111,7 @@ public static void main(String[] args) throws Exception {
Random rnd = new Random();
for (int i = 0; i < buffer; ++ i) {
- int clientId = clientIds++;
- ClientState clientState = new ClientState(clientId, servers, quorum, inlineThreshold, asynSize);
+ ClientState clientState = new ClientState(servers, quorum, inlineThreshold, asynSize);
final PascRuntime<ClientState> runtime = new PascRuntime<ClientState>(protection);
runtime.setState(clientState);
runtime.addHandler(ServerHello.class, shello);
@@ -124,7 +123,7 @@ public static void main(String[] args) throws Exception {
runtime.addHandler(Hello.class, hello);
final PaxosClientHandler handler = new PaxosClientHandler(runtime, new SimpleClient(requestSize),
- serverHosts, clientId, clients, timeout, zkConnection, executor);
+ serverHosts, clients, timeout, zkConnection, executor);
if (line.hasOption('w')) handler.setWarmup(Integer.parseInt(line.getOptionValue('w')));
if (line.hasOption('m')) handler.setMeasuringTime(Integer.parseInt(line.getOptionValue('m')));
@@ -95,9 +95,8 @@
* @throws IOException
*/
public PaxosClientHandler(final PascRuntime<ClientState> runtime, ClientInterface clientInterface, String[] servers,
- int clientId, int clients, int timeout, String zkConnection, final ExecutionHandler executor)
+ int clients, int timeout, String zkConnection, final ExecutionHandler executor)
throws IOException {
- this.clientId = clientId;
this.clients = clients;
this.timeout = timeout;
this.zk = new ZooKeeper(zkConnection, 5000, this);

0 comments on commit f881f1c

Please sign in to comment.